This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Hex manipulation
#2
Hi Buuuuudzik,

Try this:

Code:
-- String to HEX
strvalue = 'this is my string'
result = lmcore.strtohex(strvalue)
log(result)

-- HEX to String
hexvalue = '74686973206973206D7920737472696E67'
result = lmcore.hextostr(hexvalue)
log(result)

-- Remove last 2 chars (or checksum)
strvalue = 'this is my string'
result = string.sub(strvalue, 0, (string.len(strvalue) -2))
log(result)

BR,

Erwin
Reply


Messages In This Thread
Hex manipulation - by buuuudzik - 18.09.2016, 14:35
RE: Hex manipulation - by Erwin van der Zwart - 18.09.2016, 21:31
RE: Hex manipulation - by buuuudzik - 19.09.2016, 12:12
RE: Hex manipulation - by Erwin van der Zwart - 19.09.2016, 12:42
RE: Hex manipulation - by admin - 19.09.2016, 12:44
RE: Hex manipulation - by buuuudzik - 19.09.2016, 13:36
RE: Hex manipulation - by Erwin van der Zwart - 19.09.2016, 15:04
RE: Hex manipulation - by admin - 19.09.2016, 15:07
RE: Hex manipulation - by buuuudzik - 19.09.2016, 16:15

Forum Jump: