Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strsplit: ' input a string a$, output an array of tokens w$()
- DL$ = " "
- FOR i = 1 TO 64: w$(i) = "": NEXT
- words = 1: ok = 0: L = LEN(a$)
- FOR j = 1 TO L
- b$ = MID$(a$, j, 1)
- IF b$ = DL$ THEN
- IF ok = 1 THEN words = words + 1: ok = 0
- ELSE
- IF b$ > " " THEN w$(words) = w$(words) + b$: ok = 1
- END IF
- NEXT
- RETURN
Advertisement
Add Comment
Please, Sign In to add comment