str()

Converts a value to a string.

If a second parameter is provided, repeats the string up to 1000 times.

Syntax

str(value)
str(value, count)

Parameters

Parameter Type Description
value Number/String The value to convert to a string.
count Number (optional) The number of times to repeat the string. optional

Return Value

Examples

str(123);      // returns "123"
str("A", 3);   // returns "AAA"
str(5.5, 2);   // returns "5.55.5"
str("Hi", -1); // returns ""

See also

str
strlen
padleft
padright
hex
bin
chr
match