Split

Array = Split ( String [ , Separators , Escape ] )

Splits a string into substrings delimited by Separators . Escape characters can be specified : any separator characters enclosed between two escape characters are ignored in the splitting process.

(Note that Split takes only three arguments: if you want to use several separators, you should pass them as the second parameter, concatenated in a single string.)

By default, the comma character is the separator, and there are no escape characters.

This function returns a string array filled with each detected substring.

Example :

DIM Elt AS String[]
DIM Sub AS String

Elt = Split("Gambas Almost Means BASIC ! 'agree ?'", " ", "'")

FOR EACH Sub IN Elt
  PRINT Sub
NEXT

=>
Gambas
Almost
Means
BASIC
!
agree ?


Referenced by :