Page 1 of 1

String splitting

Posted: Sun Jun 05, 2005 8:29 pm
by hezoe
Hi. What is the fucntion used to split a string into two at a certain point (i.e at .)?

string Splitting

Posted: Sun Jun 05, 2005 9:41 pm
by Bill Sindel
The three string commands that come to mind are;

LEFT$(n)

RIGHT$(n)

MID$(l,n)

Posted: Mon Jun 06, 2005 8:40 am
by Z!re
INSTR(s$, w$)

Example:

Code: Select all

s$ = "Hello World!"
l$ = LEFT$(s$, INSTR(s$, " ")-1)
r$ = RIGHT$(s$, LEN(s$)-LEN(l$))

print " '"+l$+"' "
print " '"+r$+"' "