Phil Rhodes wrote:
>> Write a "\0", write a 1 byte 0 integer, or append a "\0" to the end of
>> your string.
>>
>
> Wha, does JSlibs support a literal "\0" as a null in a string?
>
> Actually, come to think of it, you could also write String.fromCharCode(0).
> Could you? (type type type) yes you could.
> ...
> P
>
That's what ECMAScript supports, nothing to do with jslibs, \0 in a
string literal is a null char ("\0" and String.fromCharCode(0) output
the exact same thing).
Internally chars are stored in 16bits though jslibs only writes 8bits so
it's not a problem (well, besides the storage in memory being twice the
size of the data you are storing for any binary data stored in a
string). I still prefer having (and using) a set type for binary data.