suve

awful: function: utf8-write

Available since rev.33 (v.0.4.2).

Declaration

utf8 :utf8-write ( mixed $ARG , … )
utf8 :str-writeu ( 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 a UTF-8 string composed of written values. For an ASCII string, use :str-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 &UTF :utf8-write $B s" " $O s" " $I s" " $H s" " $F
:writeln &UTF

wikipage modified on 2014/0601/2317