StrFill()

Creates a String with the source string in the requested number of repetitions.

PreprocessorThe Function is also available in the Preprocessor, and does not generate any machine code because only constants are used.

Syntax: String = StrFill(Source,Number)

  • Source: String to fill
  • Number: number of repetitions

Example 1:

  dim a as string
 
  a = StrFill("Hello",3)    ' output: "HelloHelloHello"
 

Example 2:

  dim char as byte
  dim a as string
 
  char=65                     ' ASCII character "A"
  s = StrFill(chr(char),5)    ' output: "AAAAA"