t14BCharactersAndStringFunctions

t14BCharactersAndStringFunctions - Characters and Strings...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Dale Roberts Characters and Strings Functions www.kite-legends.blogspot.com
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Dale Roberts Character Handling Library Character Handling Library Character handling library Character handling library Includes functions to perform useful tests and Includes functions to perform useful tests and manipulations of character data manipulations of character data Each function receives a character (an Each function receives a character (an int int ) or ) or EOF EOF as an as an argument argument The following slide contains a table of all the The following slide contains a table of all the functions in functions in <ctype.h> <ctype.h> www.kite-legends.blogspot.com
Background image of page 2
Dale Roberts Character Handling Library Character Handling Library Prototype Description int isdigit( int c ) Returns true if c is a digit and false otherwise. int isalpha( int c ) Returns true if c is a letter and false otherwise. int isalnum( int c ) Returns true if c is a digit or a letter and false otherwise. int isxdigit( int c ) Returns true if c is a hexadecimal digit character and false otherwise. int islower( int c ) Returns true if c is a lowercase letter and false otherwise. int isupper( int c ) Returns true if c is an uppercase letter; false otherwise. int tolower( int c ) If c is an uppercase letter, tolower returns c as a lowercase letter. Otherwise, tolower returns the argument unchanged. int toupper( int c ) If c is a lowercase letter, toupper returns c as an uppercase letter. Otherwise, toupper returns the argument unchanged. int isspace( int c ) Returns true if c is a white-space character—newline ( '\n' ), space ( ' ' ), form feed ( '\f' ), carriage return ( '\r' ), horizontal tab ( '\t' ), or vertical tab ( '\v' )—and false otherwise int iscntrl( int c ) Returns true if c is a control character and false otherwise. int ispunct( int c ) Returns true if c is a printing character other than a space, a digit, or a letter and false otherwise. int isprint( int c ) Returns true value if c is a printing character including space ( ' ' ) and false otherwise. int isgraph( int c ) Returns true if c is a printing character other than space ( ' ' ) and false otherwise. www.kite-legends.blogspot.com
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Dale Roberts String Conversion Functions String Conversion Functions Conversion functions Conversion functions In In <stdlib.h> <stdlib.h> (general utilities library) (general utilities library) Convert strings of digits to integer and floating- Convert strings of digits to integer and floating- point values point values Prototype Description double atof( const char *nPtr ) Converts the string nPtr to double .
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2010 for the course CSE 2017 taught by Professor Kittu during the Spring '10 term at APIIT.

Page1 / 12

t14BCharactersAndStringFunctions - Characters and Strings...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online