New string functions: 1.6.02 includes new builtin functions
for string operation. Below is the "string" help page. As you can see,
you have now access to regex, widlcard pattern match, etc...
/* DOCUMENT string
* The yorick string datatype is a character string, e.g.- "Hello, world!".
* Internally, strings are stored as 0-terminated sequences of characters,
* which are 8-bit bytes, the same as the char datatype..
* Like numeric datatypes, string behaves as a function to convert objects
* to the string datatype. There are only two interesting conversions:
* string(0) is the nil string, like a 0 pointer
* This is the only string which is "false" in an if test.
* string(pc) where pc is an array of type pointer where each pointer
* is either 0 or points to an array of type char, copies the chars
* into an array of strings, adding a trailing '\0' if necessary
* pointer(sa) where sa is an array of stringa is the inverse
* conversion, copying each string to an array of char (including the
* terminal '\0') and returning an array of pointers to them
* The strchar() function may be a more convenient way to convert from
* string to char and back.
* Yorick provides the following means of manipulating string variables:
* s+t when s and t are strings, + means concatentation
* (this is not perfect nomenclature, since t+s != s+t)
* s(,sum,..) the sum index range concatentates along a dimension of
* an array of strings
* sum(s) concatenates all the strings in an array (in storage order)
* strlen(s) returns length(s) of string(s) s
* strcase(upper, s) converts s to upper or lower case
* strchar(s_or_c) converts between string and char arrays
* (quick and dirty alternative to string<->pointer)
* strpart(s, m:n)
* strpart(s, sel) extracts substrings (sel is a [start,end] list)
* string search functions:
* strglob(pat, s) shell-like wildcard pattern match, returns 0 or 1
* strword(s, delim) parses s into word(s), returns a sel
* strfind(pat, s) simple pattern match, returns a sel
* strgrep(pat, s) regular expression pattern match, returns a sel
* streplace(s, sel, t) replaces sel in s by t
* strtrim trims leading and/or trailing blanks (based on strword)
* strmatch is a wrapper for strfind that simply returns whether there
* was a match or not rather than its exact offset
* strtok is a variant of strword that calls strpart in order to
* return the substrings rather than an sel index list
* The strword, strfind, and strgrep functions produce a sel, that is,
* a list of [start,end] offsets into an array of strings.
* These sel indicate portions of a string to be operated on for the
* strpart and streplace functions.
* The sread, swrite, and print functions operate on or produce strings.
* The rdline, rdfile, read, and write functions perform I/O on strings
* to text files.