Previous Page | Next Page

Functions for NLS

KSUBSTR Function



Extracts a substring from an argument.
Category: DBCS
Restriction: I18N Level 2
Tip: SUBSTR in SAS Language Reference: Dictionary.

Syntax
Arguments
Details
See Also

Syntax

KSUBSTR(argument,position<,n>)


Arguments

argument

specifies any SAS character expression.

position

specifies a numeric expression that is the beginning character position.

n

specifies a numeric expression that is the length of the substring to extract.

Interaction: If n is larger than the length of the expression that remains in argument after position, SAS extracts the remainder of the expression.
Tip: If you omit n, SAS extracts the remainder of the expression.

Details

The KSUBSTR function returns a portion of an expression that you specify in argument. The portion begins with the character specified by position and is the number of characters specified by n.

A variable that is created by KSUBSTR obtains its length from the length of argument.


See Also

Functions:

KSUBSTRB Function

Previous Page | Next Page | Top of Page