Compartir a través de


LEFTC( ) Function

Returns a specified number of characters from a character expression, starting with the leftmost character.

LEFTC(cExpression, nExpression)

Parameters

  • cExpression
    Specifies the character expression from which LEFTC( ) returns characters.

  • nExpression
    Specifies the number of characters returned from the character expression. If nExpression is greater than the length of cExpression, all of the character expression is returned. The empty string is returned if nExpression is negative or 0.

Return Value

Character

Remarks

LEFTC( ) is designed for expressions containing double-byte characters. If the expression contains only single-byte characters, LEFTC( ) is equivalent to LEFT( ).

LEFTC( ) returns a specified number of characters from a character expression containing any combination of single-byte and double-byte characters.

LEFTC( ) is identical to SUBSTRC( ) with a starting position of 1.

This function is useful for manipulating double-byte character sets for languages such as Hiragana and Katakana.

See Also

Reference

AT( ) Function

AT_C( ) Function

ATC( ) Function

ATCC( ) Function

ATCLINE( ) Function

ATLINE( ) Function

LEFT( ) Function

LTRIM( ) Function

RAT( ) Function

RATLINE( ) Function

RIGHT( ) Function

RTRIM( ) Function

SUBSTR( ) Function

RIGHTC( ) Function

SUBSTRC( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)