| 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 |
| fstringreplace |
verb |
file string replace |
| ljust |
verb |
left justify |
| rjust |
verb |
right justify |
| rplc |
verb |
replace characters in text string |
| ss |
verb |
string search |
| stringreplace |
verb |
replace characters in text string |
| takeafter |
verb |
take after x. in y. |
| taketo |
verb |
take to x. in y. |
charsub
character substitution
characterpairs charsub data
For example:
'-_$ ' charsub '$123 -456 -789'
123 _456 _789
Use <rplc> for arbitrary string replacement.
cuts
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
dltbs
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|
+-------------------+
dtbs
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)
fstringreplace
file string replace
form: (old;new) fstringreplace file
rplc
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++
stringreplace
replace characters in text string
form: oldnew stringreplace tet
oldnew is a 2-column boxed matrix of old ,. new
or a vector of same
stringreplace priority is the same order as oldnew
Examples:
('aba';'XYZT';'ba';'+') stringreplace 'ababa'
XYZT+
('ba';'+';'aba';'XYZT') stringreplace 'ababa'
a++
|