chrpak
chrpak,
a C code 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
operate on:
-
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;
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the MIT license
Languages:
chrpak is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
an Octave version and
a Python version.
Related Software and Data:
caesar,
a C code which
can apply a Caesar Shift Cipher to a string of text.
chrpak_test
rot13,
a C code which
makes a copy of a file which has
been encoded using the ROT13 coding, and a ROT5 coding for digits.
Reference:
-
Carl Branden, John Tooze,
Introduction to Protein Structure,
Second Edition,
Garland Publishing, 1999,
ISBN: 0815323050,
LC: QP551.B7635.
-
Paul Bratley, Bennett Fox, Linus Schrage,
A Guide to Simulation,
Second Edition,
Springer, 1987,
ISBN: 0387964673,
LC: QA76.9.C65.B73.
-
IEEE Standards Committee 754,
IEEE Standard for Binary Floating Point Arithmetic,
ANSI/IEEE Standard 754-1985,
SIGPLAN Notices,
Volume 22, Number 2, 1987, pages 9-25.
-
Donald Knuth,
The Art of Computer Programming,
Volume 3, Sorting and Searching,
Second Edition,
Addison Wesley, 1998,
ISBN: 0201896850,
LC: QA76.6.K64.
-
Albert Nijenhuis, Herbert Wilf,
Combinatorial Algorithms for Computers and Calculators,
Academic Press, 1978,
ISBN: 0-12-519260-6,
LC: QA164.N54.
Source Code:
Last revised on 13 June 2019.