NET/MASTER Network Control Language (NCL) Reference Manual

SELSTR
Built-in Functions
106126 Tandem Computers Incorporated 4–73
SELSTR The SELSTR built-in function extracts the leading portion of a string, up to a specified
character. The result is the substring comprising all characters, in the original string,
to the left of the specified search character.
If the search character is not found in the string, the entire specified string is returned.
If the search character is the first character of the specified string, a null string is
returned.
SELSTR(
char
,
string
)
char
specifies the character for which
string
is to be searched.
string
specifies the string that is searched.
Consideration
See also REMSTR, which splits a string at a specific character and returns the data to
the right of that character.
Example
In the following example, the string “U.I.POP” is searched for the period (.). The
substring containing the single character “U” is the output string:
&A = .
&B = U.I.POP
&RESULT = SELSTR(&A,&B)