Click or drag to resize

LeftC Function

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

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION LeftC(
	cExpression AS STRING,
	nExpression AS DWORD
) AS STRING
Request Example View Source

Parameters

cExpression
Type: String
Specifies the character expression from which LeftC( ) returns characters.
nExpression
Type: DWord
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

Type: String
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