xHarbour Reference Documentation > Function Reference |
Checks if the first character of a string is a 7-bit ASCII character.
IsAscii( <cString> ) --> lIs7BitChar
The function returns .T. (true) when the leftmost character of a string belongs to the 7-bit ASCII character set, otherwise .F. (false).
The function is used to check if a string begins with a character that belongs to the 7-bit ASCII character set (ASCII values 0 - 127). It returns .T. (true) when the ASCII value of the first character is smaller than 128, and .F. (false) when it begins with any other character.
See also: | IsAlNum(), IsAlpha(), 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 IsAscii() PROCEDURE Main ? IsAscii( "ABC" ) // result: .T. ? IsAscii( "xyz" ) // result: .T. ? IsAscii( "123" ) // result: .T. ? IsAscii( " xHarbour" ) // result: .T. ? IsAscii( "©" ) // result: .F. ? IsAscii( "Ñ" ) // result: .F. RETURN
http://www.xHarbour.com