摘要: -- 参数:待分割的字符串,分割字符-- 返回:子串表.(含有空串)function lua_string_split(str, split_char) local sub_str_tab = {}; while (true) do local pos = string.find(str, split_char); if (not pos) then sub_str_tab[#sub_str_tab + 1] = str; break; end local sub_str = string.sub(str, 1, pos - 1); sub_str_tab[#sub_str_tab + 1] 阅读全文
posted @ 2013-10-16 10:17 zy121 阅读(942) 评论(0) 推荐(0) 编辑