Next: tosym

Prev: toliteral

tostr

tostr(data)
This function converts any data to a string representation of it. For strings, the string representation is the string itself; for symbols and error codes, the string representation is the identifier part of the data object converted to a string value; for lists and frobs, the string representations are "" and "" respectively; for integers and dbrefs, tostr() is equivalent to toliteral().

Examples:

tostr(3)
    => "3"
tostr("foo")
    => "foo"
tostr(#0)
    => "#0"
tostr([2, 3, 4])
    => ""
tostr('foo)
    => "foo"
tostr(~methodnf)
    => "methodnf"
tostr(<#66, #[['type, 'obj], ['obj, #40]]>)
    => ""