xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

IsPrint()

Checks if the first character of a string is a printable 7-bit ASCII character.

Syntax

IsGraph( <cString> ) --> lIs7BitPrintableChar

Arguments

<cString>
A character string to check for its first character.

Return

The function returns .T. (true) when the leftmost character of a string belongs to the 7-bit ASCII character set and is printable, otherwise .F. (false).

Description

The function is used to check if a string begins with a character that belongs to the 7-bit ASCII character set that is printable (ASCII values 32 - 126). It returns .T. (true) when the ASCII value of the first character is within the range 32 to 126, and .F. (false) when it begins with any other character.

Info

See also:IsAlNum(), IsAlpha(), IsAscii(), IsCntrl(), IsDigit(), IsGraph(), IsLower(), IsPunct(), IsSpace(), IsUpper(), IsXDigit(), Lower(), Upper()
Category: Character functions , xHarbour extensions
Source:rtl\is.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example lists all printable 7-bit ASCII values to a file

   PROCEDURE Main
      LOCAL i

      SET ALTERNATE TO IsPrint.txt
      SET ALTERNATE ON

      FOR i := 0 TO 255
         IF IsPrint( Chr(i) )
            ?? Chr(i), i
            ?
         ENDIF
      NEXT

   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe