Next: , Up: Conversion Functions   [Contents][Index]

15.4.1 catos

It is often useful to convert arrays of characters into strings. The standard function catos provides the following interface:

fun catos = (char[] chars) string: { … }

It builds a string containing the characters in chars, and returns it. Examples:

(poke) catos (['a','b','c'])
(poke) catos (['\0'])

Note that if the passed array contains a NULL character '\0' then no further characters are processed. For example:

(poke) catos (['f','o','o','\0','b','a','r'])