HP C/iX Library Reference Manual (30026-90004)

Chapter 4 51
HP C/iX Library Header Descriptions
Header File Contents
Date and Time <time.h>
The header <time.h> declares data types, global variables, and functions for storing and
manipulating time values.
The date and time functions enable you to access the date and time maintained by the
system clock. The functions handle daylight savings time, and automatically convert
between standard time and daylight savings time when appropriate.
Most of the functions require the calendar time returned by time(), that is the number of
seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), January 1,
1970.
The following identifiers are declared in this header file:
strerror() function Maps an error number to a message string.
strlen() function Computes the length of the string pointed to by
s
.
strncat() function Appends a copy of one string to another string.
strncmp() function Compares two strings up to a maximum of
n
characters and
returns the result of the comparison.
strncpy() function Copies all or part of one string into another string.
strpbrk() function Returns a pointer to the location in one string of the first
occurrence of any member of the character set in another string.
strrchr() function Locates the last occurrence of a supplied character within a
string.
strspn() function Returns the length of the first substring in one string composed
entirely of members of the character set in another string.
strstr() function Locates the first occurrence in one string of the sequence of
characters specified by another string.
strtok() function Divides one string into zero or more tokens. The token
separators consist of any characters contained in another string.
strxfrm() function Transforms a string in a manner appropriate for the current
locale.
Table 4-16. Date and Time <time.h>
Name Type Description
asctime() function Converts a tm structured time variable into a null
terminated 26-character string.
clock() function Reports CPU time used.
clock_t type definition Return values from the clock function.
Table 4-15. String Handling <string.h>
Name Type Description