Syntax
string(object)
Description
The string() function returns a stringified version of the variable type given. That is, any int, float, array, hash, bool etc will be converted into a string.
Example
a=[1,2,3,4, "five"]
b=string(a)
println("OriginalType=", type(a), " NewType=", type(b), " Value=","\"",b,"\"")
a={"One": 1, "Two": 2}
b=string(a)
println("OriginalType=", type(a), " NewType=", type(b), " Value=","\"",b,"\"")
a=100
b=string(a)
println("OriginalType=", type(a), " NewType=", type(b), " Value=","\"",b,"\"")
a=true
b=string(a)
println("OriginalType=", type(a), " NewType=", type(b), " Value=","\"",b,"\"")
a=1.1
b=string(a)
println("OriginalType=", type(a), " NewType=", type(b), " Value=","\"",b,"\"")
OriginalType=array NewType=string Value="[1, 2, 3, 4, "five"]"
OriginalType=hash NewType=string Value="{"One": 1, "Two": 2}"
OriginalType=integer NewType=string Value="100"
OriginalType=bool NewType=string Value="true"
OriginalType=float NewType=string Value="1.1"