As far as I rememember split work differently in spel:
the split function expect three arguments:
- a string array in which the splitted parts will be written.
- the string to split
- the needle, a search string where to split
it returns the number of parts split was able to find.
In your case it might look as
int num_found;
string twostrings;
twostrings ="Consult ticket_ 02";
string resume[2];
num_found=split(resume, twostrings, "_");
// num_found = 2
// resume[0] will contain "Consult ticket"
// resume[1] contains " 02"
The only bad thing here: You need to know the expected maximum number of parts , before splitting. To be able, to declare the Array appropriately.
Regards
............Michael