这段时间项目需要
做了这个解析
只是简单的字符截取
但是有很大的作用
不多说
下面贴Lua源码
免得以后大家走弯路
local str = "四川成都东软##Colege###dinghq.alex@gmail.com学院"
function setTagText(text,color,onClick,key)
singleText = {};
singleText.text = text;
singleText.color = color;
singleText.onClick = onClick;
singleText.key = key;
end
function parseText(str,count)
local strIndex = string.sub(str, 1, 1);
local text = "";
local color = "";
local onClick = "";
local key = "";
-- 每次循环之后剩下的字符()
local sss = ""
Text = {};
if strIndex == "
local st = string.sub(str, 1, 2);
-- 当字符串是以
if st == "