It terminates on the first zero byte as I expected but hoped it wouldn't, so this is mostly a request for expansion to allow Base64 functions (and other relevant string functions) to work on strings with 0s in them.
Just a simple demo:
local buf = buffer.create(1024)
local i
for i=0,1023,4 do
buffer.writeu32(buf, i, i)
end
local s = buffer.tostring(buf)
local b = ll.StringToBase64(s)
ll.OwnerSay(`original buffer-string length: {string.len(s)}, base64: {string.len(b)}`)
The result is 1024 and 0, i.e. the base64 function stopped on the first 0.