NET/MASTER Network Control Language (NCL) Reference Manual

STRIP
Built-in Functions
106126 Tandem Computers Incorporated 4–77
STRIP The STRIP built-in function strips leading and/or trailing occurrences of a specified
character from a string.
STRIP(
string
[, [
option
] [,
char
] ] )
string
specifies the string to be processed.
option
specifies a parameter that indicates the strip action to be performed:
B
specifies that both leading and trailing occurrences of the specified character
are stripped. This is the default if
option
is omitted.
L
specifies that only leading occurrences of the specified character are removed.
T
specifies that only trailing occurrences of the specified character are removed.
char
specifies the character to be stripped. The default strip character is a space.
Considerations
A null input string results in a null output string.
See also JUSTIFY and SPACE. The JUSTIFY built-in function inserts spaces or
user-specified pad characters into a string. The SPACE built-in function removes
extraneous spaces from a string.
Examples
In the following example, no character is specified, so the leading and trailing spaces
are removed from the string “ ab c ”. The output string is “ab c”:
SAY STRIP( ab c )
In the following example, leading 0s are removed from the string “00012.45000”. The
output string is “12.45000”:
&A = 00012.45000
&B = L
&C = 0
&RESULT = STRIP(&A,&B,&C)