suve

awful: function: str-write

Declaration

ascii :str-write ( mixed $ARG , … )

Summary

Takes any number of arguments and writes them to a string, in a left-to-right order. Arrays and dictionaries are written the same way as if they were converted to a string - array(size) or dict(size). Contrary to string-casting, literal NIL values will be written as {NIL}.

Returns an ASCII string composed of written values. For a UTF-8 string, use :utf8-write.

Example

# :str-write example.
:set &B b0
:set &O o0
:set &I i0
:set &H h0
:set &F f0
:read &B &O &I &H &F

# The :writeln calls should produce intentical text.
:writeln             $B s" " $O s" " $I s" " $H s" " $F
:set &STR :str-write $B s" " $O s" " $I s" " $H s" " $F
:writeln &STR

wikipage modified on 2014/0601/2317