EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions

StdLib/Include/ctype.h File Reference

#include <sys/EfiCdefs.h>
#include <sys/_ctype.h>

Go to the source code of this file.

Defines

#define isalnum(c)   (__isCClass( (int)c, (_CD | _CU | _CL | _XA)))
#define isalpha(c)   (__isCClass( (int)c, (_CU | _CL | _XA)))
#define iscntrl(c)   (__isCClass( (int)c, (_CC)))
#define isdigit(c)   (__isCClass( (int)c, (_CD)))
#define isgraph(c)   (__isCClass( (int)c, (_CG)))
#define islower(c)   (__isCClass( (int)c, (_CL)))
#define isprint(c)   (__isCClass( (int)c, (_CS | _CG)))
#define ispunct(c)   (__isCClass( (int)c, (_CP)))
#define isspace(c)   (__isCClass( (int)c, (_CW)))
#define isupper(c)   (__isCClass( (int)c, (_CU)))
#define isxdigit(c)   (__isCClass( (int)c, (_CD | _CX)))
#define tolower(c)   (__toLower((int)c))
#define toupper(c)   (__toUpper((int)c))

Functions

__BEGIN_DECLS int isalnum (int c)
int isalpha (int c)
int isblank (int)
int iscntrl (int c)
int isdigit (int c)
int isgraph (int c)
int islower (int c)
int isprint (int c)
int ispunct (int c)
int isspace (int c)
int isupper (int c)
int isxdigit (int c)
int isascii (int c)
int tolower (int c)
int toupper (int c)

Detailed Description

Single-byte character classification, case conversion macros, and function declarations.

The header <ctype.h> declares several functions useful for testing and mapping characters. In all cases, the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined.

The behavior of these functions is affected by the current locale. The default is the "C" locale.

The term "printing character" refers to a member of a locale-specific set of characters, each of which occupies at least one printing position on an output device; the term control character refers to a member of a locale-specific set of characters that are not printing characters.

Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file ctype.h.


Define Documentation

#define isalnum (   c)    (__isCClass( (int)c, (_CD | _CU | _CL | _XA)))

Character Classification Macros. Undefine individually or define NO_CTYPE_MACROS, before including <ctype.h>, in order to use the Function version of the character classification macros.

Definition at line 210 of file ctype.h.

#define isalpha (   c)    (__isCClass( (int)c, (_CU | _CL | _XA)))

Definition at line 211 of file ctype.h.

#define iscntrl (   c)    (__isCClass( (int)c, (_CC)))

Definition at line 212 of file ctype.h.

#define isdigit (   c)    (__isCClass( (int)c, (_CD)))

Definition at line 213 of file ctype.h.

#define isgraph (   c)    (__isCClass( (int)c, (_CG)))

Definition at line 214 of file ctype.h.

#define islower (   c)    (__isCClass( (int)c, (_CL)))

Definition at line 215 of file ctype.h.

#define isprint (   c)    (__isCClass( (int)c, (_CS | _CG)))

Definition at line 216 of file ctype.h.

#define ispunct (   c)    (__isCClass( (int)c, (_CP)))

Definition at line 217 of file ctype.h.

#define isspace (   c)    (__isCClass( (int)c, (_CW)))

Definition at line 218 of file ctype.h.

#define isupper (   c)    (__isCClass( (int)c, (_CU)))

Definition at line 219 of file ctype.h.

#define isxdigit (   c)    (__isCClass( (int)c, (_CD | _CX)))

Definition at line 220 of file ctype.h.

#define tolower (   c)    (__toLower((int)c))

Definition at line 221 of file ctype.h.

#define toupper (   c)    (__toUpper((int)c))

Definition at line 222 of file ctype.h.


Function Documentation

__BEGIN_DECLS int isalnum ( int  c)

The isalnum function tests for any character for which isalpha or isdigit is true.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.

Definition at line 183 of file CrtWrapper.c.

int isalpha ( int  c)

The isalpha function tests for any character for which isupper or islower is true, or any character that is one of a locale-specific set of alphabetic characters for which none of iscntrl, isdigit, ispunct, or isspace is true. In the "C" locale, isalpha returns true only for the characters for which isupper or islower is true.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.
int isascii ( int  c)

The isascii function tests that a character is one of the 128 7-bit ASCII characters. This function is not part of the C standard, but is commonly used.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.
int isblank ( int  )

The isblank function tests that a character is a white-space character that results in a number of space (' ') characters being sent to the output device. In the C locale this is either ' ' or ''.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.
int iscntrl ( int  c)

The iscntrl function tests for any control character.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.
int isdigit ( int  c)

The isdigit function tests for any decimal-digit character.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.

Definition at line 154 of file CrtWrapper.c.

int isgraph ( int  c)

The isgraph function tests for any printing character except space (' ').

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.
int islower ( int  c)

The islower function tests for any character that is a lowercase letter or is one of a locale-specific set of characters for which none of iscntrl, isdigit, ispunct, or isspace is true. In the "C" locale, islower returns true only for the lowercase letters.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.
int isprint ( int  c)

The isprint function tests for any printing character including space (' ').

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.
int ispunct ( int  c)

The ispunct function tests for any printing character that is one of a locale-specific set of punctuation characters for which neither isspace nor isalnum is true. In the "C" locale, ispunct returns true for every printing character for which neither isspace nor isalnum is true.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.
int isspace ( int  c)

The isspace function tests for any character that is a standard white-space character or is one of a locale-specific set of characters for which isalnum is false. The standard white-space characters are the following: space (' '), form feed (''), new-line ('
'), carriage return (''), horizontal tab (''), and vertical tab (''). In the "C" locale, isspace returns true only for the standard white-space characters.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.

Definition at line 174 of file CrtWrapper.c.

int isupper ( int  c)

The isupper function tests for any character that is an uppercase letter or is one of a locale-specific set of characters for which none of iscntrl, isdigit, ispunct, or isspace is true. In the "C" locale, isupper returns true only for the uppercase letters.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.

Definition at line 194 of file CrtWrapper.c.

int isxdigit ( int  c)

The isxdigit function tests for any hexadecimal-digit character.

Parameters:
[in]cThe character to be tested.
Returns:
Returns nonzero (true) if and only if the value of the parameter c can be classified as specified in the description of the function.

Definition at line 163 of file CrtWrapper.c.

int tolower ( int  c)

The tolower function converts an uppercase letter to a corresponding lowercase letter.

Parameters:
[in]cThe character to be converted.
Returns:
If the argument is a character for which isupper is true and there are one or more corresponding characters, as specified by the current locale, for which islower is true, the tolower function returns one of the corresponding characters (always the same one for any given locale); otherwise, the argument is returned unchanged.

Convert a character to lower case

Parameters:
[in]CharacterThe character to convert
Returns:
The lower case equivalent of the character

Definition at line 358 of file TftpServer.c.

int toupper ( int  c)

The toupper function converts a lowercase letter to a corresponding uppercase letter.

Parameters:
[in]cThe character to be converted.
Returns:
If the argument is a character for which islower is true and there are one or more corresponding characters, as specified by the current locale, for which isupper is true, the toupper function returns one of the corresponding characters (always the same one for any given locale); otherwise, the argument is returned unchanged.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines