Ok so Im building a emulator in roblox pretty simple one however I need help I need to convert a char to hex(I need this because Im going to need to convert each char that the cpu is going to read to be converted into a hex value that can be read and used just like a number in lua.) I dont know where to start on this and need help. I hope what I’m giving isn’t to vague
Also I hate to be rude but I just want help on this function not about the emulator thank you so much
Heres a graph of what I hope for this to look like
--!strict
local function toHex(input: string): string
local hexReturn: string = ""
for char: string in string.gmatch(input, ".") do
hexReturn ..= string.format("%x", utf8.codepoint(char)) .. " "
end
return hexReturn
end