Description:
A candidate
string is matched with a another character string containing a pattern of characters and wild-card
characters. The wild-cards used are:
% a single character wild-card; ∗
an arbitrary length string wild-card, including zero length.
There is also a literal escape character ’∖’
for use when the characters ’∗’
and ’%’ are to be interpreted literally within the wild-card pattern.
Invocation
RESULT
= CHR_WILD( STRING, WILDS, MATCH )
Arguments
STRING = CHARACTER
∗ (
∗
) (Given)
The candidate string to be matched.
WILDS = CHARACTER
∗ (
∗ )
(Given)
The wild-card pattern to be used in the match.
MATCH = CHARACTER
∗ (
∗ )
(Returned)
The wild-card match: this string must be the same length as STRING. All characters
matched individually are returned as blanks in MATCH, and all characters matched by wild-cards are
returned assigned to the particular wild-cards they matched. If the length of MATCH is
less than that of STRING, then CHR_WILD returns the value .FALSE.
Returned Value
CHR_WILD = LOGICAL
Whether the two strings match after expanding the wild-card pattern.