Name | Type | Description |
charsub | verb | character substitution |
cut | verb | cut text, by default on blanks |
cuts | verb | cut y. at x. (conjunction) |
deb | verb | delete extra blanks |
delstring | verb | delete occurrences of x. from y. |
dlb | verb | delete leading blanks |
dltb | verb | delete leading and trailing blanks |
dltbs | verb | delete multiple leading and trailing blanks |
dropafter | verb | drop after x. in y. |
dropto | verb | drop to x. in y. |
dtb | verb | delete trailing blanks |
dtbs | verb | delete multiple trailing blanks in text |
ljust | verb | left justify |
rjust | verb | right justify |
rplc | verb | replace characters in text string |
ss | verb | string search |
takeafter | verb | take after x. in y. |
taketo | verb | take to x. in y. |
character substitution characterpairs charsub data For example: '-_$ ' charsub '$123 -456 -789' 123 _456 _789 Use <rplc> for arbitrary string replacement.
cut y. at x. (conjunction) string (verb cuts n) text n=_1 up to but not including string n= 1 up to and including string n=_2 after but not including string n= 2 after and including string
delete multiple leading and trailing blanks text is delimited by characters in x. with default LF example: < 'A' dltbs ' A abc def Ars A x y z ' +-------------------+ |Aabc defArsAx y z| +-------------------+
delete multiple trailing blanks in text text is delimited by characters in x. with default CRLF example: < 'A' dtbs ' A abc def Ars A x y z ' +----------------------+ |A abc defArsA x y z| +----------------------+ Algorithm thanks to Brian Bambrough (JForum Nov 2000)
replace characters in text string form: text rplc oldnew oldnew is a 2-column boxed matrix of old ,. new or a vector of same replace priority is the same order as oldnew Examples: 'ababa' rplc 'aba';'XYZT';'ba';'+' XYZT+ 'ababa' rplc 'ba';'+';'aba';'XYZT' a++