Main Page | Modules | Data Structures | File List | Data Fields | Globals

bctype.c File Reference


Detailed Description

POSIX ctype look-alike functions.

Definition in file bctype.c.

#include "../include/beeos.h"
#include "../include/bctype.h"

Include dependency graph for bctype.c:

Include dependency graph

Go to the source code of this file.

Functions

bool bisnum (char c)
 Checks if a char is a valid decimal ASCII digit (0..9).

bool bishex (char c)
 Checks if a char is a valid hexadecimal ASCII digit (0..9, a..f, A..F).

bool bisalpha (char c)
 Checks if a char is a valid letter of the ASCII alphabet (a..z, A..Z).


Function Documentation

bool bisalpha char  c  ) 
 

Checks if a char is a valid letter of the ASCII alphabet (a..z, A..Z).

Parameters:
c char to check
Return values:
bool TRUE if c is a valid ASCII hexadecimal digit (a..f, A..F), FALSE otherwise.

Definition at line 65 of file bctype.c.

00067 {
00068     if ( ((c | 32) >= 'a') && ((c | 32) <= 'z')) return true;
00069     else return false;
00070 }

bool bishex char  c  ) 
 

Checks if a char is a valid hexadecimal ASCII digit (0..9, a..f, A..F).

Parameters:
c char to check
Return values:
bool TRUE if c is a valid ASCII hexadecimal digit (0..9, a..f, A..F), FALSE otherwise.

Definition at line 50 of file bctype.c.

00052 {
00053     if (((c >= '0') && (c <= '9')) || (((c | 32) >= 'a') && ((c | 32) <= 'f')))
00054         return true;
00055     else return false;
00056 }

bool bisnum char  c  ) 
 

Checks if a char is a valid decimal ASCII digit (0..9).

Parameters:
c char to check
Return values:
bool TRUE if c is a valid ASCII decimal digit (0..9), FALSE otherwise.

Definition at line 36 of file bctype.c.

00038 {
00039     if ((c >= '0') && (c <= '9')) return true;
00040     else return false;
00041 }


Generated on Sat Apr 10 17:08:04 2004 for BeeOS by doxygen 1.3.6-20040222