STRING$()

STRING$(N,C)

RETURNS THE STRING COMPOSED OF N TIMES THE CHARACTER C

  • Type: Function
  • Parameters: 2
  • Group: Strings

ACTION

The function STRING$(N,C) returns the string composed of N times the character C.

N must be greater than 0.

C must be a string containing only one character.

Remark: the keyword STRING$ ends by '$' : it means that the returned value is a string.

SYNTAX: Result$=STRING$(N,C)

  • N = number of times the character C is repeated.
  • C = string containing the character to be repeated.
  • Result$ is a string.

USE

  • The function STRING$() is used to create a string composed of a certain number of times the same symbol.

ERROR

  • If N is not a correct expression.
  • If N is less than or equal to 0 or greater than 200.
  • If C is not a correct string expression.
  • If C does not contain only 1 character.

EXAMPLE

print string$(20,"*")

print "********************"

SEE ALSO

INSERT$()

INSTR()

LEFT$()

LEN()

LOWER$()

LTRIM$()

MID$()

RIGHT$()

RTRIM$()

STR$()

TRIM$()

UPPER$()