Previous Page | Next Page

Functions for NLS

KTRIM Function



Removes trailing DBCS blanks and SO/SI from character expressions.
Category: DBCS
Restriction: I18N Level 2
Tip: Non-DBCS equivalent function is TRIM in SAS Language Reference: Dictionary.

Syntax
Arguments
Details
See Also

Syntax

KTRIM(argument)


Arguments

argument

specifies any SAS character expression.


Details

KTRIM copies a character argument, removes all trailing blanks, and returns the trimmed argument as a result. If the argument is blank, KTRIM returns one blank. KTRIM is useful for concatenating because concatenation does not remove trailing blanks.

Assigning the results of KTRIM to a variable does not affect the length of the receiving variable. If the trimmed value is shorter than the length of the receiving variable, SAS pads the value with new blanks as it assigns it to the variable.


See Also

Functions:

KCOMPRESS Function

KLEFT Function

KRIGHT Function

Previous Page | Next Page | Top of Page