DELSUBSTR$
|
Syntax: |
DELSUBSTR$(<String>,<Separator>,<Number
of Substring>)
|
||||||
|
|
|
||||||
|
Meaning: |
Deletes a substring in a string which has
separators. <Separator> divides the <String>
into several substrings. DELSUBSTR$ return a string in which the substring
number <Number of Substring> in <String> has been deleted. If <Number of Substring> <= 0 or
> number of substrings, <String> is returned. |
||||||
|
Parameter: |
|
||||||
|
Sample: |
H$ =
"AAA;BBB;ccc" SEP$ =
";" S0$ = DELSUBSTR$(H$,SEP$,0)
/* S0$ contains "AAA;BBB;ccc" S1$ = DELSUBSTR$(H$,SEP$,1)
/* S1$ contains "BBB;ccc" S2$ = DELSUBSTR$(H$,SEP$,2)
/* S2$ contains "AAA;ccc" S3$ = DELSUBSTR$(H$,SEP$,3)
/* S3$ contains "AAA;BBB" S4$ = DELSUBSTR$(H$,SEP$,4)
/* S4$ contains "AAA;BBB;ccc" H$ =
"Hello" S1$ = DELSUBSTR$(H$,";",1) /* S1$ contains "" S2$ = DELSUBSTR$(H$,";",2) /* S2$ contains "Hello" H$ =
"Test1;;Test2;" S1$ = DELSUBSTR$(H$,";;",1) /* S1$ contains "Test2;" S2$ = DELSUBSTR$(H$,";;",2) /* S2$ contains "Test1" |
||||||
|
See also: |
|