Answer the question
In order to leave comments, you need to log in
How to remove non-printable characters from a string?
I add this to the end of the line
function zero_padding_add(data, blocksize)
local pad = blocksize - math.fmod(#data, blocksize)
return data .. string.rep('\0', pad)
end
function zero_padding_remove(data)
return string.gsub(data, '%\0+', '')
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question