SPLIT

SmallBASIC syntax groups: 


String command SPLIT


10
20  SPLIT string, delimiters, words() [, pairs] [USE expr]
30
Returns the words of the specified string into array ‘words’.


See examples


If there is insufficient information on this page and you wish learn more about SPLIT, please send an email to smallbasic@gmail.com. You can help to improve information about SPLIT by submitting an article using the comments link below. Note, an offline language reference text file is now avialable – see the Download section.

s="/etc/temp/filename.ext"
SPLIT s, "/.", v()
FOR i=0 TO UBOUND(v)
  PRINT i;" [";v(i);"]"
NEXT

displays:
0 []
1 [etc]
2 [temp]
3 [filename]
4 [ext]