OWBasic for Pocketviewer

Home INTRO Group SFUNC Alphabetical Index

Split String with Separators

SPLIT S1$, s2$ [,S3$]

s2 is understood as delimiter. The part of the string S1 before the delimiter is stored on S3. In S1 the remainder of the original string after the delimiter remains. If the separation string is not contained in S1, the whole string S1 is assigned to the variable S3 and S1 is empty.

If S3 is not given, the splitted part is not stored. Example:
s$="John:34" : ! Example string
split s$,":",name$ : ! Split in name/number
PRINT name$ : ! "John"
PRINT s$ : ! "34"


  • POS - Search for Substring in String
  • SPLITN - Split a Number of Characters From a String
Home INTRO Group SFUNC Alphabetical Index