|
Module
character_functions
Home
--> Fact
Sheet -->
Free Source Code
--> character_functions
About the Module
character_functions
Go directly to Downloads
The module character_functions contains some
functions which operate on character variables. Included are functions to
categorize the character variables, and perform various transformations and
comparisons. This module uses module
standard_types, which may be obtained from
the Portability Project pages.
Back to the Top
A list of (most) constants and procedures defined
follows.
- Operators
- .eqic., .neic., .ltic., .leic.,
.geic., and .gtic. are binary comparison operators which ignore
differences of case.
- .lexeq., .lexne., .lexlt.,
.lexle., .lexge., .lexgt. are binary comparison operators,
which compare punctuation lowest, digits next and letters highest, ignoring
case.
Back to the Top
- Library
- isascii() is returns true if the integer or character
is a seven bit ascii character.
- isupper() returns true if its character argument is an
upper case letter.
- islower() returns true if its character argument is a
lower case letter.
- isprint() returns true if its character argument is a
printable character (includes blank).
- isgraph() returns true if its character argument is a
printable graphic character (does not include blank).
- isalpha() returns true if its character argument is a
letter.
- isalnum() returns true if its character argument is a
letter or digit.
- isdigit() returns true if its character argument is a
digit.
- isxdigit() returns true if its character argument is a
hexadecimal digit (0-9, a-f).
- ispunct() returns true if its character argument is a
punctuation character.
- iswhtspc() returns true if its character argument is a
white space character.
- iscntl() returns true if its character argument is a
control character.
- toupper() returns its argument changed to upper case
if it was a lower case letter.
- tolower() returns its argument changed to lower case
if it was an upper case letter.
- isevenp() returns true if its character argument has
the parity bit (the eighth bit) set is make even parity.
- isoddp() returns true if its character argument has
the parity bit (the eighth bit) set is make odd parity.
- ismarkp() returns true if its character argument has
the parity bit (the eighth bit) set to make mark parity.
- isclrp() returns true if its character argument has
the parity bit (the eighth bit) set is make clear parity.
- toevenp() returns its character argument with the
parity bit (the eighth bit) set is make even parity.
- tooddp() returns its character argument with the
parity bit (the eighth bit) set is make odd parity.
- tomarkp() returns its character argument with the
parity bit (the eighth bit) set is make mark parity.
- toclrp() returns its character argument with the
parity bit (the eighth bit) set is make clear parity.
- rbn() returns its character argument with trailing
blanks replaced by nulls.
- rnb() returns its character argument with trailing
nulls replaced by blanks.
- bcomp() converts its input character argument to a
blank compressed character variable, ignoring quoted strings.
- bclc() converts its input character argument to a
blank compressed character variable with upper case letters converted to lower
case, ignoring quoted strings.
- bcuc() converts its input character argument to a
blank compressed character variable with lower case letters converted to upper
case, ignoring quoted strings.
- tr() maps its input character argument to its output
character argument via a user supplied translation table.
- compare_string() returns the index of the first
difference between its arguments.
- replace_substring() replaces all occurrances within
the string of the substring by the replacement string.
- string_cat() returns the first string with the second
string concatenated after all nonblank characters.
- matching_pair() finds the close parenthesis, bracket
or brace matching the opening parenthesis, bracket or brace.
- unquote_string() returns the string with single quotes
or double quotes removed (a pair of quotes within the string is treated as one
quote), an escape character may be optionally specified.
Back to the Top
To download the character_functions module, click
character_functions. This
module depends on the standard_types module, see
the portability project for
information about how to make one for your compiler.
To make comments or suggestions regarding
standard_functions, or any of our software, please
E-mail us. We're always happy to share
the experiences others have using our software.
Back to the Top |