|
|
@ -341,4 +341,20 @@ function string:parseargs() |
|
|
|
|
|
|
|
|
|
|
|
-- Return the found arguments.. |
|
|
|
-- Return the found arguments.. |
|
|
|
return args; |
|
|
|
return args; |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
-- func: string.strip_colors |
|
|
|
|
|
|
|
-- desc: Strips FFXi based colors from a string. |
|
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
function string.strip_colors(s) |
|
|
|
|
|
|
|
return (s:gsub('[' .. string.char(0x1E, 0x1F, 0x7F) .. '].', '')); |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
-- func: string.strip_translate |
|
|
|
|
|
|
|
-- desc: Strips FFXi based auto-translate tags from a string. |
|
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
function string.strip_translate(s) |
|
|
|
|
|
|
|
return (s:gsub(string.char(0xEF) .. '[' .. string.char(0x27, 0x28) .. ']', '')); |
|
|
|
end |
|
|
|
end |