Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Software engineered and maintained by Coronaxe,
- please provide original author name when
- altering or redistributing this software!
- Thank you!
- ]]--
- function StrToByteArr( str )
- local tBytes = {}
- for i = 1, #str do
- table.insert(tBytes,str:byte(i,i))
- end
- return tBytes
- end
- function StrToNumber( str )
- local bytestr = 0
- for i = 1, #str do
- bytestr = bytestr + string.byte(string.sub(str, i, i+1))
- end
- return bytestr
- end
- function ByteArrToStr( tBytes )
- local str = ""
- for i = 1, #tBytes do
- str = str .. string.char( tBytes[i] )
- end
- return str
- end
- function ArrToStr( tArr )
- local str = ""
- for i = 1, #tArr do
- str = str .. tArr[i]
- end
- return str
- end
Add Comment
Please, Sign In to add comment