ITeye博客

lua string trim

lua · 2009-12-27 16:26 · 编程语言 · Markdown

function trim(s)
 local from = s:match"^%s*()"
 return from > #s and "" or s:match(".*%S", from)
end

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。