function Split (szfullstring, szseparator)
local nfindstartindex = 1
Local nsplitindex = 1
local Nsplitarray = {}
while true does
local nfindlastindex = String.find (szfullstring, Szseparator, Nfindstartindex)
if not Nfindlastindex then
nsplitarray[nsplitindex] = string.sub (szfullstring, Nfindstartindex, String.len ( szfullstring))
break
end
Nsplitarray[nsplitindex] = string.sub (szfullstring, Nfindstartindex, nFindLastIndex-1)
Nfindstartindex = Nfindlastindex + String.len (szseparator)
Nsplitindex = Nsplitindex + 1< C12/>end
return Nsplitarray
End
Usage:
Local List = Split ("abc,123,345", ",")
And then the list is inside.
Abc
123
345
The The second argument can be more than one character, but it cannot be a LUA regular expression. For example. , or%w or something like that.
The enhanced version will be released later, this should be mostly enough.