M# Flashcards
is usually declared as an array of char
C-String
declares a set of functions to
work with C style string (null terminated byte strings).
header file
copies character string from source to destination
strcpy
copies a specified bytes of characters from source to
destination.
strncpy
appends a copy of a string to the end of another string
strcat
appends a specified number of characters of a string to
the end of another string
strncat
returns length of given string
strlen
compares two null terminating string. The
comparison is done lexicographically.
strcmp
compares a specified number of characters of two
null terminating strings. The comparison is done l
exicographically.
strncmp
can be used to read a line of input
and place the string of characters on that line into a C-string
variable.
getline
allows your program to read in one character
of input and store it in a variable of type char
get function
Convert uppercase letter to lowercase
tolower
Convert lowercase letter to uppercase
toupper
Check if character is lowercase letter
islower
Check if character is alphabetic
isalpha
Check if character is decimal digit
isdigit
Check if character is alphanumeric
isalnum
Check if character is a white space
isspace
Check if character is a punctuation character
ispunct
Check if character is printable
isprint
Check if character has graphical representation
isgraph
Check if character is a control character
Isctrl
The class which provides a definition to do so is called a
String class
needs to be included in the program
to use the String class.
String header
This function member is analogous to the member function get except that it is used for output rather than input.
put
This header declares a set of functions to classify and
transform individual characters
cctype
Check if character is uppercase letter
isupper
calculates the number of characters in
the string including spaces and punctuation marks.
length()
Values present in two strings can be checked for equality either
using the X or the X
equality operator ‘==’
compare() function.
Two string can be joined either by using the X
or the X
addition operator ‘+’
append() function