diff options
| author | ruki <[email protected]> | 2019-04-28 08:21:28 +0900 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-04-28 08:21:28 +0900 |
| commit | 6051aaec944bc40dd8e53316bdd88451b14a8a19 (patch) | |
| tree | df0badfffadb1c975292c49d9c2ea783805fe354 /xmake/core/base/string.lua | |
| parent | 2fc83b38a2aa6c5dc80efe89d7b3864b356cf412 (diff) | |
improve autotools envs
Diffstat (limited to 'xmake/core/base/string.lua')
| -rw-r--r-- | xmake/core/base/string.lua | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/xmake/core/base/string.lua b/xmake/core/base/string.lua index 68b246327..5aabba734 100644 --- a/xmake/core/base/string.lua +++ b/xmake/core/base/string.lua @@ -177,29 +177,6 @@ function string:rtrim() return self:sub(1, n) end --- append a substring with a given separator -function string:append(substr, separator) - - -- check - assert(self) - - -- not substr? return self - if not substr then - return self - end - - -- append it - local s = self - if #s == 0 then - s = substr - else - s = string.format("%s%s%s", s, separator or "", substr) - end - - -- ok - return s -end - -- encode: ' ', '=', '\"', '<' function string:encode() @@ -220,25 +197,6 @@ function string:decode() return (self:gsub("%%(%x%x)", function (w) return string.char(tonumber(w, 16)) end)) end --- join array to string with the given separator -function string.join(items, sep) - - -- join them - local str = "" - local index = 1 - local count = #items - for _, item in ipairs(items) do - str = str .. item - if index ~= count and sep ~= nil then - str = str .. sep - end - index = index + 1 - end - - -- ok? - return str -end - -- try to format function string.tryformat(format, ...) |
