I'm trying to add a function to the table string.
function string.bytes(s_str) -- errors
assert(type("") == type(s_str), "bad argument #1 to 'string.bytes' (string expected, got " .. type(s_str) .. ")")
return tostring(s:gsub(".", function(c)
return ("\\" .. c:byte()) or c or ""
end))
end
How can I unlock string table?

2 comments
thx m8!
You're very welcome. Also note that you're not limited to using string. You can replace it with table and add functions to table.