VMS Help
MMS, Description File, Predefined functions, Text operations
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
The following functions perform text processing operations:
$(ADDPREFIX prefix,text)
Prepends to text. 'prefix' is prepended to the start of each word
in 'text'.
$(ADDSUFFIX suffix,text)
Appends to text. 'suffix' is appended to the end of each word in
'text'.
$(FILTER pattern...,text)
Filters text. Any word in 'text' that does not match any 'pattern'
word is removed. 'pattern' words may contain the wildcard
characters * and %.
$(FILTER-OUT pattern...,text)
Filters text. Any word in 'text' that matches any 'pattern' word
is removed. 'pattern' words may contain the wildcard characters
* and %.
$(FINDSTRING find,text)
String search. If 'find' occurs in 'text', the value is 'find';
otherwise, the value is empty.
$(FIRSTWORD text)
Returns the first word in 'text'.
$(FOREACH macro,list,text)
Repeatedly expands text. For each word in 'list', 'text' is
repeated with the value of 'macro' defined as the word from 'list'.
$(JOIN list,text)
Concatenates word by word. Each word in 'text' is appended to the
corresponding word in 'list' to form a word in the result. When
the number of words in 'list' and 'text' are not the same, the
remaining words from the longer list are simply appended to the
result.
$(PATSUBST pattern...,to,text)
Pattern substitution. Each word in 'text' that matches any
'pattern' word is replaced by 'to'. 'pattern' words may contain
the wildcard characters * and %. If 'to' also contains wildcard
characters, they will be replaced by the text that matched the
wildcard characters in 'pattern'.
$(SORT text)
Sorts text. Words in 'text' are sorted into lexical order;
duplicated words are removed.
$(STRIP text)
White-space compression. Leading and trailing white-space is
removed from 'text' and each internal sequence of white-space
characters is replaced by a single space.
$(SUBST from,to,text)
String substitution. Each occurrence of 'from' in 'text' is
replaced by 'to'.
$(WORD n,text)
Returns the n'th word from 'text'. 'n' should be in the range 1 to the
number of words in the list; when 'n' is not in this range, the result
is empty.
$(WORDS text)
Returns the number of words in 'text'.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.