The docs and change notes say that the string class should have a split(string delimiter) function, but I can't find any trace of it in the current source code... just wondering what happened to it.
http://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes_strings.html
http://www.angelcode.com/angelscript/changes.php
For now I am using this:
string[] split(string str, string delimiter)
{
string[] parts;
int startPos = 0;
while (true) {
int index = str.findFirst(delimiter, startPos);
if ( index == -1 ) {
parts.insertLast( str.substr(startPos) );
break;
}
else {
parts.insertLast( str.substr(startPos, index - startPos) );
startPos = index + delimiter.length;
}
}
return parts;
}