Artifact f99c2f64e2a2d393aed6983a12a99fc7fd7372a61b980a06e75b58ed4e506a4c:
- File 残局文料/lib/程语_月_基类_文_内置库_加多.lua — part of check-in [49fd90cf4e] at 2024-01-27 02:23:34 on branch trunk — (/ω\) (user: 顽雨沉风, size: 490) [annotate] [blame] [check-ins using]
function string:lstrip() return self:gsub("^%s+", "") end function string:rstrip() if self == nil then return nil end local s = self:gsub("%s+$", "") return s end function string:strip() return self:lstrip():rstrip() end function string:startswith(text) local size = text:len() if self:sub(1, size) == text then return self end end function string:endswith(text) if self:sub(-#text) == text then return self end end