xHarbour Reference Documentation > Function Reference |
Checks if the first character of a string is alpha-numeric.
IsAlNum( <cString> ) --> lIsAlphaNumeric
The function returns .T. (true) when the leftmost character of a string is alpha-numeric, otherwise .F. (false).
The function is used to check if a string begins either with a digit, or with an upper or lower case letter from A to Z. It returns .T. (true) when a string begins with an alpha-numeric character, and .F. (false) when it begins with any other character.
See also: | IsAlpha(), IsAscii(), IsCntrl(), IsDigit(), IsGraph(), IsLower(), IsPrint(), IsPunct(), IsSpace(), IsUpper(), IsXDigit(), Lower(), Upper() |
Category: | Character functions , xHarbour extensions |
Source: | rtl\is.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates various results of IsAlNum() PROCEDURE Main ? IsAlNum( "ABC" ) // result: .T. ? IsAlNum( "xyz" ) // result: .T. ? IsAlNum( "123" ) // result: .T. ? IsAlNum( " xHarbour" ) // result: .F. ? IsAlNum( ".Net" ) // result: .F. ? IsAlNum( "-10" ) // result: .F. ? IsAlNum( ".5" ) // result: .F. RETURN
http://www.xHarbour.com