Node:Common library functions, Next:Mathematical functions, Previous:Kinds of library, Up:Libraries
Common library functions
Checking character types. Handling strings. Doing maths.
The libraries in GCC contain a repertoire of standard functions and macros. There are many different kinds of function and macro in the libraries. Here are a few of the different kinds available, with the header files you can use to access them:
- Character handling:
ctype.h - Mathematics:
math.h - String manipulation:
string.h
You may find it useful to read the header files yourself. They
are usually found in the directories /usr/include and its
subdirectories on GNU/Linux systems. The three header files listed
above can be found in /usr/include; there is a second version of
ctype.h in /usr/include/linux.1
Footnotes
-
The version of
ctype.hin the/usr/includedirectory proper is the one that comes withglibc; the one in/usr/include/linuxis a special version associated with the Linux kernel. You can specify the one you want with a full pathname inside double quotes (for example,#include "/usr/include/linux/ctype.h"), or you can use the-Ioption ofgccto force GCC to search a set of directories in a specific order. See Building a library, for more information.)