Closed ElRubioLoco closed 1 year ago
In my split string method, the built-in array methods calls generate errors :
Here is my function :
array<string> splitString(const string& in str, const string& in delimiter) { array<string> result; int startPos = 0; int endPos = str.findFirst(delimiter); while (endPos != -1) { result.insertLast(str.substr(startPos, endPos - startPos)); startPos = endPos + delimiter.Length; endPos = str.find(delimiter, startPos); } result.insertLast(str.substr(startPos)); return result; }
Here the array is correctly initialized and the used methods are referenced here in AngelScript documentation...
In my split string method, the built-in array methods calls generate errors :
Here is my function :