title: "StrSplit" description: TRSE built-in method (from IDE help)
StrSplit
Systems: C64, MEGA65, PLUS4, C128, VIC20, PET, X16, OK64
Parameters: a,a,b
StrSplit( [ input string ], [ output string list ], [ split token ] );
- [ input string ] - Input string
- [ output string list ] - Output string list separated by #0
- [ split token ] - Token to split string with (i.e "key_space", ";" etc)
Description
Splits a string into null-terminated substrings with a separator token.
Example
// Splits "myString" separated by space ($20) to "list"
strsplit(myString,list,key_space);
zp:=strgetfromindex(list,1); // zp (pointer) now points to the second item in the list