Previous Topic: &MSGREPL

Next Topic: Free-form Syntax


&NBLSTR

Returns a string with leading and trailing blanks removed.

&NBLSTR string

&NBLSTR is a built-in function and must be used to the right of an assignment statement.

User variables may contain leading or trailing blanks entered by an operator during full-screen processing, or from other built-in functions such as &SUBSTR, &ASISTR, and &SETLENG.

&NBLSTR removes any leading and trailing blanks from data and returns this string.

If the data consists entirely of blanks, the target variable is set to null.

Operands:

string

Data or a variable with data from which both leading and trailing blanks are to be removed.

Examples: &NBLSTR

&CMD = &NBLSTR &COMMAND 
&1 = &NBLSTR &1

To remove only leading blanks, use the &LBLSTR function. To remove only trailing blanks, use the &TBLSTR function.

More information:

&LBLSTR

&TBLSTR

&ASISTR