HTML Utilities

Showing help on 'decode_binary()'

Syntax: decode_binary (STR bin-string [, fully]) => LIST

Returns a list of strings and/or integers representing the bytes in the binary string <bin-string> in order. If <fully> is false or omitted, the list contains an integer only for each non-printing, non-space byte; all other characters are grouped into the longest possible contiguous substrings. If <fully> is proved and true, the list contains only integers, one for each byte represented in <bin-string>. Raises E_INVARG if <bin-string> is not a properly-formed binary string. (See the LambdaMOO programmer's manual on MOO value types for a full description of binary strings.)

decode_binary("foo") => {"foo"}
decode_binary("~~foo") => {"~foo"}
decode_binary("foo~0D~0A") => {"foo", 13, 10}
decode_binary("foo~0Abar~0Abaz") => {"foo", 10, "bar", 10, "baz"}
decode_binary("foo~0D~0A", 1) => {102, 111, 111, 13, 10}



-- telnet://project-mongoose.net:7777 -- Mail us -- http://project-mongoose.net:7780/ --
-- Five users connected --