This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
jay5476's profile picture

How To Turn Text Into Binary

Started by jay5476, 12 September 2013 - 04:06 PM
jay5476 #1
Posted 12 September 2013 - 06:06 PM
how would I turn normal text into binary
theoriginalbit #2
Posted 12 September 2013 - 06:39 PM
Well you can get bytes from text, you'll need to convert from bytes to the binary (unless of course all you wanted was the bytes).
You can use the string.byte function. This function also allows us to get all the bytes by doing the following

local str = "someString"
local tBytes = { string.byte(str, 1, #str) }