diff options
Diffstat (limited to 'xmake/core/base/string.lua')
| -rw-r--r-- | xmake/core/base/string.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/base/string.lua b/xmake/core/base/string.lua index c819a5e08..baa4a5e1a 100644 --- a/xmake/core/base/string.lua +++ b/xmake/core/base/string.lua @@ -131,13 +131,15 @@ function string:rtrim(trimchars) return string._trim(self, trimchars, 1) end --- encode: ' ', '=', '\"', '<' +-- encode: ' ', '=', '\"', '<' (deprecated) function string:encode() + deprecated.add(nil, "string:encode()") return (self:gsub("[%s=\"<]", function (w) return string.format("%%%x", w:byte()) end)) end --- decode: ' ', '=', '\"' +-- decode: ' ', '=', '\"' (deprecated) function string:decode() + deprecated.add(nil, "string:decode()") return (self:gsub("%%(%x%x)", function (w) return string.char(tonumber(w, 16)) end)) end |
