Binary strings: Difference between revisions

m
Line 1,837:
 
-- Strings are binary safe
put numtochar(0) into char 6 of foo
str = "Hello world!"
put numtocharchartonum(0) into foo.char [6 of str])
put chartonum(str.char[6])
-- 0
put str.char[7..strfoo.length]
-- "world!"
 
Line 1,867 ⟶ 1,866:
----------------------------------------
-- Replace in string
-- A binary safe version could be implemented by converting strings to byteArrays,
-- and then
-- @param {string} stringToFind
-- @param {string} stringToInsert
Anonymous user