xcall XSTRIP, strarg
xcall XSTRIP, strng, filter, opcode
XSTRIP.SBR added to the standard release, after fixing some bugs introduced in 5.1 during translation of the original proprietary version written by John Pruitt. The subroutine performs various string editing operations. Note that in the first syntax, the routine is equivalent to XCALL STRIP (removes trailing blanks).
Parameters
strarg (string, 2+ bytes) [in/out]
the string to be operated on.
filter (string, 1+ bytes) [in]
contains filter info, depending on opcode.
opcode (num) [in]
defines the operation.
Opcode |
Function |
---|---|
1 |
All occurrences of any of the individual characters in the filter are removed from strarg. |
2 |
All occurrences of characters NOT in filter are removed from strarg. |
3 |
|
4 |
|
5 |
Remove matching characters from the end of the string. Same concept as opcode 4 but starts at the end of strarg and works backwards. |
6 |
|
7 |
Reduce multiple spaces to single spaces. Filter not used. E.g.: XCALL XSTRIP,strarg,"",7 |