SINPUT
SINPUT src; var [, delim] [,var [, delim]] ...
Splits the string src
into substrings which are
separated by delimiters delim1
to delimN
and
returns the substrings as var1
to varN
.
Delimiters can be single characters, numbers or strings.
Example 1: Split string with delimiter “,”
"1456,Peter,8"
src =
SINPUT src; id, ",", name, ",", age
print "ID : " + id
print "Name: " + name
print "Age : " + age
' Output:
' ID : 1456
' Name: Peter
' Age : 8
Example 2: Split string with complex delimiters
"if x>1 then y"
src = SINPUT src; vif, " ", vcond, "then", vdo
print vif, vcond, vdo ' Output: if x>1 y
Code samples using SINPUT
String
ASC
BCS
BIN
CBS
CHOP
CHR
DISCLOSE
ENCLOSE
FORMAT
HEX
INSTR
JOIN
LCASE
LEFT
LEFTOF
LEFTOFLAST
LOWER
LTRIM
MID
OCT
REPLACE
RIGHT
RIGHTOF
RIGHTOFLAST
RINSTR
RTRIM
SINPUT
SPACE
SPC
SPLIT
SPRINT
SQUEEZE
STR
STRING
TRANSLATE
TRIM
UCASE
UPPER
VAL
If there is insufficient information on this page and you wish learn more about SINPUT,
please send an email to smallbasic@gmail.com. You can help to improve information about
SINPUT by submitting a pull request,
click View Source for details. Note, an offline language reference text file is also available - see the Download section.