Strings and Characters
a C library which
can handle characters and strings.
CHRPAK began when I simply wanted to be able to capitalize
a string. Now it has expanded to a number of interesting uses.
Many unusual situations are provided for, including
string '31.2' <=> numeric value 31.2;
uppercase <=> lowercase;
removal of control characters or blanks;
sorting, merging, searching.
Many of the routine names begin with the name of the data type they
B4 - a 4 byte word;
CH - a character;
CHVEC - a vector of characters;
DEC - a decimal fraction;
DIGIT - a character representing a numeric digit;
I4 - an integer;
R4 - a real;
R8 - a double precision real;
RAT - a ratio I/J;
S - a string;
SVEC - a vector of strings;
SVECI - a vector of strings, implicitly capitalized;
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
CHRPAK is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Software and Data:
a C library which
can apply a Caesar Shift Cipher to a string of text.
a C program which
makes a copy of a file which has
been encoded using the ROT13 coding, and a ROT5 coding for digits.
Carl Branden, John Tooze,
Introduction to Protein Structure,
Garland Publishing, 1999,
Paul Bratley, Bennett Fox, Linus Schrage,
A Guide to Simulation,
IEEE Standards Committee 754,
IEEE Standard for Binary Floating Point Arithmetic,
ANSI/IEEE Standard 754-1985,
Volume 22, Number 2, 1987, pages 9-25.
The Art of Computer Programming,
Volume 3, Sorting and Searching,
Addison Wesley, 1998,
Albert Nijenhuis, Herbert Wilf,
Combinatorial Algorithms for Computers and Calculators,
Academic Press, 1978,
Last revised on 13 June 2019.