REMOVE$ function REMOVE statement
Purpose: REMOVE$ returns a
substring of MainStr$ parameter with all occurences of the Match$
string being removed.
Syntax 1:
SubStr$ = REMOVE$(MainStr$, Match$)
Parameters:
- MainStr$ String which is to be searched for and purged
of Match$ character.
- Match$ Occurences of this string are to be removed from
MainStr$.
Return Value:
- SubStr$, the return value, is a substring of MainStr$
parameter with all occurences of the Match$ string being
removed.
Syntax 2:
REMOVE Match$ FROM MainStr$
Parameters:
- MainStr$ String which is to be searched for and purged
of Match$ character.
- Match$ Occurences of this string are to be removed from
MainStr$.
Syntax 3:
REMOVE UCASE$("bcx") FROM LTRIM$(RTRIM$(AMainStr$))
Parameters:
- The REMOVE command also allows full
expressions and arrays as arguments.
|
Example:
DIM SubStr$
SubStr$ = REMOVE$("123ABC123", "123")
PRINT SubStr$
Result:
ABC
BCX Console Sample Programs using IREMOVE$ function.
S93.bas S110.bas
IREMOVE$ function IREMOVE statement
Purpose: REMOVE and IREMOVE$ perform a case insensitive removal of the
Match$ substrings contained in MainStr$.
Syntax 1:
SubStr$ = IREMOVE$(MainStr$, Match$)
Parameters:
- MainStr$ String which is to be searched for and purged
of Match$ string.
- Match$Occurences of this string are to be removed
without regard to case sensitivity in MainStr$. ABC, abc, Abc, aBc
and so on are all considered equivalent.
Return Value:
- SubStr$, the return value, is a string with all case
insensitive occurences of Match$ removed.
|
Syntax 2:
IREMOVE Match$ FROM MainStr$
Parameters:
- MainStr$ String which is to be searched for and purged
of Match$ string.
- Match$ Case insensitive occurences of this string are to
be removed from MainStr$. ABC, abc, Abc, aBc and so on are all
considered equivalent.
|
Syntax 3:
IREMOVE UCASE$("bcx") FROM LTRIM$(RTRIM$(AMainStr$))
Parameters:
- The IREMOVE command also allows full
expressions and arrays as arguments.
|
Example:
DIM A$
A$= "This is A saMpLe oF a LONG, long, LOng, loNG, rambling sentence."
IREMOVE "long, " FROM A$ 'now we can remove them all
IREPLACE CHR$(32,32) WITH CHR$(32) IN A$
IREPLACE "A SAMPLE OF" WITH "not" IN A$
PRINT A$ ' Result: This is not a rambling sentence.