Home > Language Reference > String Management Functions > Str$

Str$

The Str$ function returns the string representation of the specified number.

Usage

Used to concatenate an integer to a string. The integer must be first converted to a string before the concatenation (the concatenation operator is the + sign).

Syntax

var$=Str$(<number>)

Parameter

<number>, integer positive or negative.  

Return value

var$, string, representing the value of the numeric.

See also

Asc
Chr$
Encrypt
ExtractBetween$
InStr
InStrRev
LCase$
Left$
Len
LTrim$
Mid$
Replace$
Right$
RTrim$
SplitIntoArray
Trim$
UCase$
Val

Examples

Var$ = Str$(123 ) ' Returns the string "123"

Var$ = Str$(-123) ' Returns the string "-123"

msgbox(str$(25))

Var$ = Str$(var)

' Concatenation
i=0
repeat
     msgbox("index is now: "+str$(i))
     i=i+1
until i=5