HP C/iX Library Reference Manual (30026-90004)
50 Chapter4
HP C/iX Library Header Descriptions
Header File Contents
String Handling <string.h>
The header <string.h> declares several functions for manipulating character arrays and
other objects treated as character arrays. A
string
is a sequence of characters terminated
by and including the first null character. A
pointer to
a string is a pointer to its first
character. The
length
of the string is the number of characters preceding the first null
character.
The following identifiers are declared by <string.h>:
strtoul() function Converts a string to an unsigned integer representation.
system() function Executes an MPE/iX command.
wchar_t type definition A data type definition used for wide characters.
wcstombs() function Converts a sequence of wide character codes to a sequence of
multibyte characters.
wctomb() function Converts a single wide character value to its multibyte
character representation.
Table 4-15. String Handling <string.h>
Name Type Description
memchr() function Searches memory for a specified character.
memcmp() function Compares the first
n
characters of two objects.
memcpy() function Copies a specified number of characters from one object to
another.
memmove() function Copies a specified number of characters from one object to
another. Allows source and destination objects to overlap.
memset() function Initializes an object with a supplied character value.
NULL macro The constant 0.
size_t type definition The unsigned integral type of the sizeof operator.
strcat() function Appends one string to another.
strchr() function Locates the first occurrence of a specified character within a
string.
strcmp() function Compares two strings and returns an integer indicating the
result of the comparison.
strcpy() function Copies the contents of one string to another string.
strcspn() function Returns the length of the first substring in one string composed
entirely of non-members of the character set of another string.
Table 4-14. General Utilities <stdlib.h>
Name Type Description