[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
General Programming Concepts:
Writing and Debugging Programs
List of Character Manipulation Subroutines
The character manipulation functions and macros test
and translate ASCII characters.
These functions and macros are of three kinds:
- Character testing
- Character translation
- Miscellaneous character manipulation
The Programming Example for Manipulating Characters illustrates some of the
character manipulation routines.
Character Testing
Use the following functions and macros to determine
character type. Punctuation, alphabetic, and case-querying functions values
depend on the current collation table.
The ctype subroutines contain the following functions:
isalpha |
Is character alphabetic? |
isalnum |
Is character alphanumeric? |
isupper |
Is character uppercase? |
islower |
Is character lowercase? |
isdigit |
Is character a digit? |
isxdigit |
Is character a hex digit? |
isspace |
Is character a blank-space character? |
ispunct |
Is character a punctuation character? |
isprint |
Is character a printing character, including space? |
isgraph |
Is character a printing character, excluding space? |
iscntrl |
Is character a control character? |
isascii |
Is character an integer ASCII character? |
Character Translation
The conv subroutines contain the following functions:
toupper |
Converts a lowercase letter to uppercase |
_toupper |
(Macro) Converts a lowercase letter to uppercase |
tolower |
Converts an uppercase letter to lowercase |
_tolower |
(Macro) Converts an uppercase letter to lowercase |
toascii |
Converts an integer to an ASCII character |
Miscellaneous Character Manipulation
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]