lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> How can I check whether a string is a hexadecimal number or not? E.g. "0x123" is a hex string, but "123" and "xyz" are not.

If you just want to convert the string to a number, tonumber does that
because it understands the "0x" prefix.