Click or drag to resize

PosAlpha Function

X#
Retrieves the 1 based position of the first letter in a string.

Namespace:  XSharp.XPP
Assembly:  XSharp.XPP (in XSharp.XPP.dll) Version: 2.19
Syntax
 FUNCTION PosAlpha(
	cString,
	lNoLetter,
	nIgnoreCharsFromLeft
) AS LONG CLIPPER
Request Example View Source

Parameters

cString (Optional)
Type: Usual
String to check
lNoLetter (Optional)
Type: Usual
When TRUE is passed then the first character is returned which is not a not a letter. Defaults to FALSE.
nIgnoreCharsFromLeft (Optional)
Type: Usual
Number of characters that must be ignored. Defaults to 0.

Return Value

Type: Long
Returns the position of the first letter in a string as a numeric value, or ZERO when there is no uppercase letter in the string.
Remarks
In X# A letter is defined as a character for which the Char.IsLetter() method returns TRUE. If lNoLetter is set to TRUE the function returns the position of the first character which is not a letter.
See Also