Function Libraries template What it’s should do
abort stdlib.h void abort(void); Stops a program abnormally.
Calculates the absolute value
abs stdlib.h int abs(int n);
of an integer argument n.
acos math.h double acos(double x); Calculates the arc cosine of x.
Converts the time that is
char *asctime(const struct tm
asctime time.h stored as a structure to a
*time);
character string.
Converts tm that is stored as a
char *asctime_r (const struct tm structure to a character string.
asctime_r time.h
*tm, char *buf); (Restartable version of
asctime.)
asin math.h double asin(double x); Calculates the arc sine of x.
Prints a diagnostic message
assert assert.h void assert(int expression); and ends the program if the
expression is false.
Calculates the arc tangent
atan math.h double atan(double x);
of x.
Calculates the arc tangent
atan2 math.h double atan2(double y, double x);
of y/x.
Registers a function to be
atexit stdlib.h int atexit(void (*func)(void));
called at normal termination.
Converts string to a double-
atof stdlib.h double atof(const char *string);
precision floating-point value.
atoi stdlib.h int atoi(const char *string); Converts string to an integer.
Converts string to a long
atol stdlib.h long int atol(const char *string);
integer.
Performs a binary search on
void *bsearch(const void *key,
an array of num elements,
const void *base, size_t num,
each of size bytes. The array
bsearch stdlib.h size_t size, int (*compare) (const
must be sorted in ascending
void *element1, const void
order by the function pointed
*element2));
to by compare.
Determines
stdio.h whether c constitues a valid
btowc wint_t btowc(int c);
wchar.h multibyte character in the
initial shift state.
Reserves storage space for an
void *calloc(size_t num, array of num elements, each
calloc stdlib.h
size_t size); of size size, and initializes the
values of all elements to 0.
nl_types. Closes a previously opened
catclose6 int catclose (nl_catd catd);
h message catalog.
nl_types. char *catgets(nl_catd catd, int Retrieves a message from an
catgets6
h set_id, int msg_id, const char *s); open message catalog.
Opens a message catalog,
nl_types. nl_catd catopen (const char
catopen6 which must be done before a
h *name, int oflag);
message can be retrieved.
ceil math.h double ceil(double x); Calculates the double value
representing the smallest
integer that is greater than or
equal to x.
Resets the error indicators and
clearerr stdio.h void clearerr(FILE *stream); the end-of-file indicator
for stream.
Returns the processor time
clock time.h clock_t clock(void); that has elapsed since the job
was started.
cos math.h double cos(double x); Calculates the cosine of x.
Calculates the hyperbolic
cosh math.h double cosh(double x);
cosine of x.
Converts time to a character
ctime time.h char *ctime(const time_t *time);
string.
char *ctime64(const time64_t Converts time to a character
ctime64 time.h
*time); string.
Converts time to a character
char *ctime_r(const time_t
ctime_r time.h string. (Restartable version of
*time, char *buf);
ctime.)
Converts time to a character
char *ctime64_r(const time64_t
ctime64_r time.h string. (Restartable version of
*time, char *buf);
ctime64.)
double difftime(time_t time2, Computes the difference
difftime time.h
time_t time1); between time2 and time1.
double
Computes the difference
difftime64 time.h difftime64(time64_t time2,
between time2 and time1.
time64_t time1);
Calculates the quotient and
div_t div(int numerator,
div stdlib.h remainder of the division
int denominator);
of numerator by denominator.
Calculates the error function
erf math.h double erf(double x);
of x.
Calculates the error function
erfc math.h double erfc(double x);
for large values of x.
exit stdlib.h void exit(int status); Ends a program normally.
Calculates the exponential
exp math.h double exp(double x); function of a floating-point
argument x.
Calculates the absolute value
fabs math.h double fabs(double x); of a floating-point
argument x.
fclose stdio.h int fclose(FILE *stream); Closes the specified stream.
Associates an input or output
FILE *fdopen(int handle, const
fdopen5 stdio.h stream with the file identified
char *type);
by handle.
Tests whether the end-of-file
feof stdio.h int feof(FILE *stream);
flag is set for a given stream.
ferror stdio.h int ferror(FILE *stream); Tests for an error indicator in
reading from or writing
to stream.
Writes the contents of the
fflush1 stdio.h int fflush(FILE *stream); buffer associated with the
output stream.
Reads a single unsigned
fgetc1 stdio.h int fgetc(FILE *stream); character from the
input stream.
Stores the current position of
int fgetpos(FILE *stream, fpos_t the file pointer associated
fgetpos1 stdio.h
*pos); with stream into the object
pointed to by pos.
char *fgets(char *string, int n, Reads a string from the
fgets1 stdio.h
FILE *stream); input stream.
Reads the next multibyte
stdio.h
fgetwc6 wint_t fgetwc(FILE *stream); character from the input
wchar.h
stream pointed to by stream.
Reads wide characters from
stdio.h wchar_t *fgetws(wchar_t *wcs,
fgetws6 the stream into the array
wchar.h int n, FILE *stream);
pointed to by wcs.
Determines the file handle
fileno5 stdio.h int fileno(FILE *stream); currently associated
with stream.
Calculates the floating-point
floor math.h double floor(double x); value representing the largest
integer less than or equal to x.
Calculates the floating-point
fmod math.h double fmod(double x, double y);
remainder of x/y.
FILE *fopen(const char
fopen stdio.h Opens the specified file.
*filename, const char *mode);
Formats and prints characters
int fprintf(FILE *stream, const
fprintf stdio.h and values to the
char *format-string, arg-list);
output stream.
Prints a character to the
fputc1 stdio.h int fputc(int c, FILE *stream);
output stream.
int fputs(const char *string, FILE Copies a string to the
fputs1 stdio.h
*stream); output stream.
Converts the wide
character wc to a multibyte
stdio.h wint_t fputwc(wchar_t wc, character and writes it to the
fputwc6
wchar.h FILE *stream); output stream pointed to
by stream at the current
position.
Converts the wide-character
string wcs to a multibyte-
stdio.h int fputws(const wchar_t *wcs,
fputws6 character string and writes it
wchar.h FILE *stream);
to stream as a multibyte
character string.
fread stdio.h size_t fread(void *buffer, Reads up to count items
size_t size, size_t count, FILE of size length from the
*stream); input stream, and stores them
in buffer.
free stdlib.h void free(void *ptr); Frees a block of storage.
FILE *freopen(const char
Closes stream, and reassigns
freopen stdio.h *filename, const char *mode,
it to the file specified.
FILE *stream);
Separates a floating-point
double frexp(double x, int
frexp math.h number into its mantissa and
*expptr);
exponent.
int fscanf(FILE *stream, const Reads data from stream into
fscanf stdio.h
char *format-string, arg-list); locations given by arg-list.
Changes the current file
int fseek(FILE *stream, long
fseek1 stdio.h position associated
int offset, int origin);
with stream to a new location.
Moves the current file
int fsetpos(FILE *stream, const
fsetpos1 stdio.h position to a new location
fpos_t *pos);
determined by pos.
Gets the current position of
ftell1 stdio.h long int ftell(FILE *stream);
the file pointer.
Determines the orientation of
stdio.h int fwide(FILE *stream,
fwide6 the stream pointed to
wchar.h int mode);
by stream.
stdio.h int fwprintf(FILE *stream, const Writes output to the stream
fwprintf6
wchar.h wchar_t *format, arg-list); pointed to by stream.
size_t fwrite(const void *buffer, Writes up to count items
fwrite stdio.h size_t size,size_t count, FILE of size length
*stream); from buffer to stream.
stdio.h int fwscanf(FILE *stream, const Reads input from the stream
fwscanf6
wchar.h wchar_t *format, arg-list) pointed to by stream.
Computes the Gamma
gamma math.h double gamma(double x);
Function
Reads a single character from
getc1 stdio.h int getc(FILE *stream);
the input stream.
Reads a single character
getchar1 stdio.h int getchar(void);
from stdin.
char *getenv(const char Searches environment
getenv stdlib.h
*varname); variables for varname.
Reads a string from stdin, and
gets stdio.h char *gets(char *buffer);
stores it in buffer.
Reads the next multibyte
character from stream,
stdio.h converts it to a wide character
getwc6 wint_t getwc(FILE *stream);
wchar.h and advances the associated
file position indicator
for stream.
Reads the next multibyte
character from stdin, converts
getwchar6 wchar.h wint_t getwchar(void); it to a wide character, and
advances the associated file
position indicator for stdin.
struct tm *gmtime(const time_t Converts a time value to a
gmtime time.h
*time); structure of type tm.
struct tm *gmtime64(const Converts a time value to a
gmtime64 time.h
time64_t *time); structure of type tm.
Converts a time value to a
struct tm *gmtime_r (const structure of type tm.
gmtime_r time.h
time_t *time, struct tm *result); (Restartable version of
gmtime.)
Converts a time value to a
struct tm *gmtime64_r (const
structure of type tm.
gmtime64_r time.h time64_t *time, struct tm
(Restartable version of
*result);
gmtime64.)
Calculates the hypotenuse of
double hypot(double side1, a right-angled triangle with
hypot math.h
double side2); sides of
length side1 and side2.
isalnum ctype.h int isalnum(int c); Tests if c is alphanumeric.
isalpha ctype.h int isalpha(int c); Tests if c is alphabetic.
Tests if c is within the 7-bit
isascii4 ctype.h int isascii(int c);
US-ASCII range.
Tests if c is a blank or tab
isblank ctype.h int isblank(int c);
character.
Tests if c is a control
iscntrl ctype.h int iscntrl(int c);
character.
isdigit ctype.h int isdigit(int c); Tests if c is a decimal digit.
Tests if c is a printable
isgraph ctype.h int isgraph(int c);
character excluding the space.
islower ctype.h int islower(int c); Tests if c is a lowercase letter.
Tests if c is a printable
isprint ctype.h int isprint(int c);
character including the space.
Tests if c is a punctuation
ispunct ctype.h int ispunct(int c);
character.
Tests if c is a whitespace
isspace ctype.h int isspace(int c);
character.
Tests if c is an uppercase
isupper ctype.h int isupper(int c);
letter.
Checks for any alphanumeric
iswalnum4 wctype.h int iswalnum (wint_t wc);
wide character.
Checks for any alphabetic
iswalpha4 wctype.h int iswalpha (wint_t wc);
wide character.
Checks for any blank or tab
iswblank4 wctype.h int iswblank (wint_t wc);
wide character.
Tests for any control wide
iswcntrl4 wctype.h int iswcntrl (wint_t wc);
character.
Determines whether or not the
int iswctype(wint_t wc, wctype_t
iswctype4 wctype.h wide character wc has the
wc_prop);
property wc_prop.
Checks for any decimal-digit
iswdigit4 wctype.h int iswdigit (wint_t wc);
wide character.
Checks for any printing wide
4
iswgraph wctype.h int iswgraph (wint_t wc); character except for the wide-
character space.
Checks for any lowercase
iswlower4 wctype.h int iswlower (wint_t wc);
wide character.
Checks for any printing wide
iswprint4 wctype.h int iswprint (wint_t wc);
character.
Test for a wide non-
iswpunct4 wctype.h int iswpunct (wint_t wc); alphanumeric, non-space
character.
Checks for any wide character
that corresponds to an
iswspace4 wctype.h int iswspace (wint_t wc); implementation-defined set of
wide characters for which
iswalnum is false.
Checks for any uppercase
iswupper4 wctype.h int iswupper (wint_t wc);
wide character.
Checks for any hexadecimal
iswxdigit4 wctype.h int iswxdigit (wint_t wc);
digit character.
Tests if c is a hexadecimal
isxdigit4 wctype.h int isxdigit(int c);
digit.
Calculates the Bessel function
j0 math.h double j0(double x); value of the first kind of order
0.
Calculates the Bessel function
j1 math.h double j1(double x); value of the first kind of order
1.
Calculates the Bessel function
jn math.h double jn(int n, double x); value of the first kind of
order n.
Calculates the absolute value
labs stdlib.h long int labs(long int n);
of n.
Returns the value
ldexp math.h double ldexp(double x, int exp); of x multiplied by (2 to the
power of exp).
Calculates the quotient and
ldiv_t ldiv(long int numerator,
ldiv stdlib.h remainder
long int denominator);
of numerator/denominator.
Formats numeric quantities in
localeconv locale.h struct lconv *localeconv(void); struct lconv according to the
current locale.
struct tm *localtime(const time_t Converts timeval to a
localtime time.h
*timeval); structure of type tm.
struct tm *localtime64(const Converts timeval to a
localtime64 time.h
time64_t *timeval); structure of type tm.
Converts a time value to a
struct tm *localtime_r (const
structure of type tm.
localtime_r time.h time_t *timeval, struct tm
(Restartable version of
*result);
localtime.)
localtime64_r time.h struct tm *localtime64_r (const Converts a time value to a
structure of type tm.
time64_t *timeval, struct tm
(Restartable version of
*result);
localtime64.)
Calculates the natural
log math.h double log(double x);
logarithm of x.
Calculates the base 10
log10 math.h double log10(double x);
logarithm of x.
Restores a stack environment
void longjmp(jmp_buf env,
longjmp setjmp.h previously set in env by the
int value);
setjmp function.
malloc stdlib.h void *malloc(size_t size); Reserves a block of storage.
int mblen(const char *string, Determines the length of a
mblen stdlib.h
size_t n); multibyte character string.
Determines the length of a
int mbrlen (const char *s, size_t multibyte character.
mbrlen4 wchar.h
n, mbstate_t *ps); (Restartable version of
mblen.)
Convert a multibyte character
int mbrtowc (wchar_t *pwc,
to a wide character
mbrtowc4 wchar.h const char *s, size_t n, mbstate_t
(Restartable version of
*ps);
mbtowc.)
Test state object *ps for initial
mbsinit4 wchar.h int mbsinit (const mbstate_t *ps);
state.
Convert multibyte string to a
size_t mbsrtowc (wchar_t *dst,
wide character string.
mbsrtowcs4 wchar.h const char **src, size_t len,
(Restartable version of
mbstate_t *ps);
mbstowcs.)
Converts the multibyte
characters in string to their
size_t mbstowcs(wchar_t *pwc,
mbstowcs stdlib.h corresponding wchar_t codes,
const char *string, size_t n);
and stores not more
than n codes in pwc.
Stores the wchar_t code
corresponding to the
int mbtowc(wchar_t *pwc, const
mbtowc stdlib.h first n bytes of multibyte
char *string, size_t n);
character string into the
wchar_t character pwc.
Searches the first count bytes
void *memchr(const void *buf, of buf for the first occurrence
memchr string.h
int c, size_t count); of c converted to an unsigned
character.
int memcmp(const void *buf1, Compares up to count bytes
memcmp string.h
const void *buf2, size_t count); of buf1 and buf2.
void *memcpy(void *dest, const Copies count bytes
memcpy string.h
void *src, size_t count); of src to dest.
Copies count bytes
void *memmove(void *dest,
memmove string.h of src to dest. Allows copying
const void *src, size_t count);
between objects that overlap.
void *memset(void *dest, int c, Sets count bytes of dest to a
memset string.h
size_t count); value c.
Converts local time into
mktime time.h time_t mktime(struct tm *time);
calendar time.
time64_t mktime64(struct tm Converts local time into
mktime64 time.h
*time); calendar time.
Breaks down the floating-
double modf(double x, double
modf math.h point value x into fractional
*intptr);
and integral parts.
Calculates the next
double nextafter(double x,
nextafter math.h representable value after x in
double y);
the direction of y.
Calculates the next
long double nextafterl(long
nextafterl math.h representable value after x in
double x, long double y);
the direction of y.
Calculates the next
double nexttoward(double x, long
nexttoward math.h representable value after x in
double y);
the direction of y.
Calculates the next
long double nexttowardl(long
nexttowardl math.h representable value after x in
double x, long double y);
the direction of y.
Retrieve from the current
langinfo. locale the string that describes
nl_langinfo4 char *nl_langinfo(nl_item item);
h the requested information
specified by item.
Prints an error message to
perror stdio.h void perror(const char *string);
stderr.
Calculates the value x to the
pow math.h double pow(double x, double y);
power y.
int printf(const char *format- Formats and prints characters
printf stdio.h
string, arg-list); and values to stdout.
putc1 stdio.h int putc(int c, FILE *stream); Prints c to the output stream.
putchar1 stdio.h int putchar(int c); Prints c to stdout.
Sets the value of an
int *putenv(const char environment variable by
putenv stdlib.h
*varname); altering an existing variable
or creating a new one.
puts stdio.h int puts(const char *string); Prints a string to stdout.
Converts the wide
stdio.h wint_t putwchar(wchar_t wc, character wc to a multibyte
putwc6
wchar.h FILE *stream); character, and writes it to the
stream at the current position.
Converts the wide
character wc to a multibyte
putwchar6 wchar.h wint_t putwchar(wchar_t wc);
character and writes it to
stdout.
void qsort(void *base,
size_t num, size_t width, Performs a quick sort of an
qsort stdlib.h int(*compare)(const void array of num elements, each
*element1, const void of width bytes in size.
*element2));
quantexpd32 math.h _Decimal32 Compute the quantum
quantized32(_Decimal32 x, exponent of a single-precision
_Decimal32 y); decimal floating-point value.
Compute the quantum
_Decimal64
exponent of a double-
quantexpd64 math.h quantized64(_Decimal64 x,
precision decimal floating-
_Decimal64 y);
point value.
_Decimal128 Compute the quantum
quantexpd128 math.h quantized128(_Decimal128 x, exponent of a quad-precision
_Decimal128 y); decimal floating-point value.
Set the quantum exponent of
a single-precision decimal
floating-point value to the
quantized32 math.h int quantexpd32(_Decimal32 x);
quantum exponent of another
single-precision decimal
floating-point value.
Set the quantum exponent of
a double-precision decimal
floating-point value to the
quantized64 math.h int quantexpd64(_Decimal64 x);
quantum exponent of another
double-precision decimal
floating-point value.
Set the quantum exponent of
a quad-precision decimal
int floating-point value to the
quantized128 math.h
quantexpd128(_Decimal128 x); quantum exponent of another
quad-precision decimal
floating-point value.
Determine if the quantum
__bool__
exponents of two single-
samequantumd32 math.h samequantumd32(_Decimal32 x,
precision decimal floating-
_Decimal32 y);
point values are the same.
Determine if the quantum
__bool__
exponents of two double-
samequantumd64 math.h samequantumd64(_Decimal64 x,
precision decimal floating-
_Decimal64 y);
point values are the same.
Determine if the quantum
__bool__
samequantumd12 exponents of two quad-
math.h samequantumd128(_Decimal128
8 precision decimal floating-
x, _Decimal128 y);
point values are the same.
Sends the signal sig to the
raise signal.h int raise(int sig);
running program.
Returns a pseudo-random
rand stdlib.h int rand(void);
integer.
Returns a pseudo-random
rand_r stdlib.h int rand_r(void);
integer. (Restartable version)
Changes the size of a
void *realloc(void *ptr,
realloc stdlib.h previously reserved storage
size_t size);
block.
regcomp regex.h int regcomp(regex_t *preg, const Compiles the source regular
char *pattern, int cflags); expression pointed to
by pattern into an executable
version and stores it in the
location pointed to by preg.
size_t regerror(int errcode, const Finds the description for the
regerror regex.h regex_t *preg, char *errbuf, error code errcode for the
size_t errbuf_size); regular expression preg.
Compares the null-ended
int regexec(const regex_t *preg, string string against the
regexec regex.h const char *string, size_t nmatch, compiled regular
regmatch_t *pmatch, int eflags); expression preg to find a
match between the two.
Frees any memory that was
allocated by regcomp to
regfree regex.h void regfree(regex_t *preg);
implement the regular
expression preg.
Deletes the file specified
remove stdio.h int remove(const char *filename);
by filename.
int rename(const char *oldname,
rename stdio.h Renames the specified file.
const char *newname);
Repositions the file pointer
rewind1 stdio.h void rewind(FILE *stream); associated with stream to the
beginning of the file.
int scanf(const char *format- Reads data from stdin into
scanf stdio.h
string, arg-list); locations given by arg-list.
void setbuf(FILE *stream, char
setbuf stdio.h Controls buffering for stream.
*buffer);
Saves a stack environment
setjmp setjmp.h int setjmp(jmp_buf env); that can be subsequently
restored by longjmp.
char *setlocale(int category, Changes or queries variables
setlocale locale.h
const char *locale); defined in the locale.
int setvbuf(FILE *stream, char Controls buffering and
setvbuf stdio.h
*buf, int type, size_t size); buffer size for stream.
void(*signal (int sig, void(*func) Registers func as a signal
signal signal.h
(int))) (int); handler for the signal sig.
sin math.h double sin(double x); Calculates the sine of x.
Calculates the hyperbolic sine
sinh math.h double sinh(double x);
of x.
Same as sprintf except that
int snprintf(char *outbuf, size_t the function will stop after n
snprintf stdio.h
n, const char*, ...) characters have been written
to outbuf.
int sprintf(char *buffer, const Formats and stores characters
sprintf stdio.h
char *format-string, arg-list); and values in buffer.
Calculates the square root
sqrt math.h double sqrt(double x);
of x.
Sets the seed for the pseudo-
srand stdlib.h void srand(unsigned int seed);
random number generator.
sscanf stdio.h int sscanf(const char *buffer, Reads data from buffer into
the locations given by arg-
const char *format, arg-list);
list.
int srtcasecmp(const char Compares strings without
strcasecmp strings.h
*string1, const char *string2); case sensitivity.
char *strcat(char *string1, const Concatenates string2 to string
strcat string.h
char *string2); 1.
char *strchr(const char *string, Locates the first occurrence
strchr string.h
int c); of c in string.
int strcmp(const char *string1, Compares the value
strcmp string.h
const char *string2); of string1 to string2.
Compares two strings using
int strcoll(const char *string1,
strcoll string.h the collating sequence in the
const char *string2);
current locale.
char *strcpy(char *string1, const
strcpy string.h Copies string2 into string1.
char *string2);
Returns the length of the
initial substring
size_t strcspn(const char
strcspn string.h of string1 consisting of
*string1, const char *string2);
characters not contained
in string2.
Maps the error number
strerror string.h char *strerror(int errnum); in errnum to an error message
string.
int strfmon (char *s, size_t Converts monetary value to
strfmon4 wchar.h
maxsize, const char *format, ...); string.
size_t strftime (char *dest, Stores characters in an array
size_t maxsize, const char pointed to by dest, according
strftime time.h
*format, const struct tm to the string determined
*timeptr); by format.
Calculates the length
strlen string.h size_t strlen(const char *string);
of string.
int strncasecmp(const char
Compares strings without
strncasecmp strings.h *string1, const char *string2,
case sensitivity.
size_t count);
Concatenates up
char *strncat(char *string1, const
strncat string.h to count characters
char *string2, size_t count);
of string2 to string1.
int strncmp(const char *string1, Compares up
strncmp string.h const char *string2, to count characters
size_t count); of string1 and string2.
char *strncpy(char *string1,
Copies up to count characters
strncpy string.h const char *string2,
of string2 to string1.
size_t count);
Locates the first occurrence
char *strpbrk(const char
strpbrk string.h in string1 of any character
*string1, const char *string2);
in string2.
char *strptime (const char *buf,
strptime4 time.h const char *format, struct tm Date and time conversion
*tm);
strrchr string.h char *strrchr(const char *string, Locates the last occurrence
int c); of c in string.
Returns the length of the
initial substring
size_t strspn(const char *string1,
strspn string.h of string1 consisting of
const char *string2);
characters contained
in string2.
Returns a pointer to the first
char *strstr(const char *string1,
strstr string.h occurrence
const char *string2);
of string2 in string1.
double strtod(const char *nptr, Converts nptr to a double
strtod stdlib.h
char **endptr); precision value.
Converts nptr to a single-
_Decimal32 strtod32(const char
strtod32 stdlib.h precision decimal floating-
*nptr, char **endptr);
point value.
Converts nptr to a double-
_Decimal64 strtod64(const char
strtod64 stdlib.h precision decimal floating-
*nptr, char **endptr);
point value.
Converts nptr to a quad-
_Decimal128 strtod128(const
strtod128 stdlib.h precision decimal floating-
char *nptr, char **endptr);
point value.
float strtof(const char *nptr, char
strtof stdlib.h Converts nptr to a float value.
**endptr);
Locates the next token
char *strtok(char *string1, const
strtok string.h in string1 delimited by the
char *string2);
next character in string2.
Locates the next token
char *strtok_r(char *string, const in string delimited by the next
strtok_r string.h
char *seps, char **lasts); character in seps. (Restartable
version of strtok.)
long int strtol(const char *nptr, Converts nptr to a signed long
strtol stdlib.h
char **endptr, int base); integer.
long double strtold(const char Converts nptr to a long
strtold stdlib.h
*nptr, char **endptr); double value.
unsigned long int strtoul(const
Converts string1 to an
strtoul stdlib.h char *string1, char **string2,
unsigned long integer.
int base);
Converts string2 and places
size_t strxfrm(char *string1,
the result in string1. The
strxfrm string.h const char *string2,
conversion is determined by
size_t count);
the program's current locale.
Formats and stores a series of
int swprintf(wchar_t *wcsbuffer,
wide characters and values
swprintf wchar.h size_t n, const
into the wide-character
wchar_t *format, arg-list);
buffer wcsbuffer.
int swscanf (const Reads data from buffer into
swscanf wchar.h wchar_t *buffer, const the locations given by arg-
wchar_t *format, arg-list) list.
Passes string to the system
system stdlib.h int system(const char *string);
command analyzer.
tan math.h double tan(double x); Calculates the tangent of x.
Calculates the hyperbolic
tanh math.h double tanh(double x);
tangent of x.
Returns the current calendar
time time.h time_t time(time_t *timeptr);
time.
time64_t time64(time64_t Returns the current calendar
time64 time.h
*timeptr); time.
Creates a temporary binary
tmpfile stdio.h FILE *tmpfile(void);
file and opens it.
Generates a temporary file
tmpnam stdio.h char *tmpnam(char *string);
name.
Converts c to a character in
toascii ctype.h int toascii(int c); the 7-bit US-ASCII character
set.
tolower ctype.h int tolower(int c); Converts c to lowercase.
toupper ctype.h int toupper(int c); Converts c to uppercase.
Translates the wide
wint_t towctrans(wint_t wc,
towctrans wctype.h character wc based on the
wctrans_t desc);
mapping described by desc.
Converts uppercase letter to
towlower4 wctype.h wint_t towlower (wint_t wc);
lowercase letter.
Converts lowercase letter to
towupper4 wctype.h wint_t towupper (wint_t wc);
uppercase letter.
Pushes c back onto the
ungetc1 stdio.h int ungetc(int c, FILE *stream);
input stream.
Pushes the wide
stdio.h wint_t ungetwc(wint_t wc,
ungetwc6 character wc back onto the
wchar.h FILE *stream);
input stream.
Returns the value of one
var_type va_arg(va_list arg_ptr, argument and
va_arg stdarg.h
var_type); modifies arg_ptr to point to
the next argument.
void va_copy(va_list dest, Initializes dest as a copy
va_copy stdarg.h
va_list src); of src.
Facilitates normal return from
va_end stdarg.h void va_end(va_list arg_ptr); variable argument list
processing.
Initializes arg_ptr for
void va_start(va_list arg_ptr,
va_start stdarg.h subsequent use
variable_name);
by va_arg and va_end.
Formats and prints characters
stdio.h int vfprintf(FILE *stream, const to the output stream using a
vfprintf
stdarg.h char *format, va_list arg_ptr); variable number of
arguments.
Reads data from a specified
stdio.h int vfscanf(FILE *stream, const stream into locations given by
vfscanf
stdarg.h char *format, va_list arg_ptr); a variable number of
arguments.
vfwprintf6 stdarg.h int vfwprintf(FILE *stream, Equivalent to fwprintf, except
stdio.h const wchar_t *format, va_list that the variable argument list
wchar.h arg); is replaced by arg.
Reads wide data from a
int vfwscanf(FILE *stream, const
stdio.h specified stream into
vfwscanf wchar_t *format, va_list
stdarg.h locations given by a variable
arg_ptr);
number of arguments.
Formats and prints characters
stdio.h int vprintf(const char *format,
vprintf to stdout using a variable
stdarg.h va_list arg_ptr);
number of arguments.
Reads data from stdin into
stdio.h int vscanf(const
vscanf locations given by a variable
stdarg.h char *format, va_list arg_ptr);
number of arguments.
int vsprintf(char *target-string, Formats and stores characters
stdio.h
vsprintf const char *format, in a buffer using a variable
stdarg.h
va_list arg_ptr); number of arguments.
Same as vsprintf except that
int vsnprintf(char *outbuf, size_t the function will stop after n
vsnprintf stdio.h
n, const char*, va_list); characters have been written
to outbuf.
int vsscanf(const char*buffer, Reads data from a buffer into
stdio.h
vsscanf const char *format, va_list locations given by a variable
stdarg.h
arg_ptr); number of arguments.
int
Formats and stores a series of
stdarg.h vswprintf(wchar_t *wcsbuffer,
vswprintf wide characters and values in
wchar.h size_t n, const
the buffer wcsbuffer.
wchar_t *format, va_list arg);
int vswscanf(const Reads wide data from a buffer
stdio.h wchar_t *buffer, const into locations given by a
vswscanf
wchar.h wchar_t *format, va_list variable number of
arg_ptr); arguments.
Equivalent to wprintf, except
stdarg.h int vwprintf(const
vwprintf6 that the variable argument list
wchar.h wchar_t *format, va_list arg);
is replaced by arg.
Reads wide data from stdin
int vwscanf(const
stdio.h into locations given by a
vwscanf wchar_t *format, va_list
wchar.h variable number of
arg_ptr);
arguments.
Converts a wide character to a
int wcrtomb (char *s, wchar_t multibyte character.
wcrtomb4 wchar.h
wchar, mbstate_t *pss); (Restartable version of
wctomb.)
Appends a copy of the string
wchar_t
pointed to by string2 to the
wcscat wchar.h *wcscat(wchar_t *string1, const
end of the string pointed to
wchar_t *string2);
by string1.
wchar_t *wcschr(const Searches the wide-character
wcschr wchar.h wchar_t *string, string pointed to by string for
wchar_t character); the occurrence of character.
int wcscmp(const
Compares two wide-character
wcscmp wchar.h wchar_t *string1, const
strings, *string1 and *string2.
wchar_t *string2);
Compares two wide-character
4 int wcscoll (const wchar_t
wcscoll wchar.h strings using the collating
*wcs1, const wchar_t *wcs2);
sequence in the current locale.
Copies the contents
wchar_t
of *string2 (including the
wcscpy wchar.h *wcscpy(wchar_t *string1, const
ending wchar_t null
wchar_t *string2);
character) into *string1.
Determines the number of
wchar_t characters in the
size_t wcscspn(const
initial segment of the string
wcscspn wchar.h wchar_t *string1, const
pointed to by *string1 that do
wchar_t *string2);
not appear in the string
pointed to by *string2.
size_t wcsftime(wchar_t *wdest, Converts the time and date
size_t maxsize, const specification in
wcsftime wchar.h
wchar_t *format, const struct the timeptr structure into a
tm *timeptr); wide-character string.
Computes the number of
size_t wcslen(const
wcslen wchar.h wide-characters in the string
wchar_t *string);
pointed to by string.
Formats numeric quantities
struct wcslconv
wcslocaleconv locale.h in struct wcslconv according
*wcslocaleconv(void);
to the current locale.
Appends up to count wide
wchar_t characters from string2 to the
wcsncat wchar.h *wcsncat(wchar_t *string1, const end of string1, and appends a
wchar_t *string2, size_t count); wchar_t null character to the
result.
int wcsncmp(const Compares up to count wide
wcsncmp wchar.h wchar_t *string1, const characters
wchar_t *string2, size_t count); in string1 to string2.
wchar_t
Copies up to count wide
*wcsncpy(wchar_t *string1,
wcsncpy wchar.h characters
const wchar_t *string2,
from string2 to string1.
size_t count);
Locates the first occurrence in
wchar_t *wcspbrk(const the string pointed to
wcspbrk wchar.h wchar_t *string1, const by string1 of any wide
wchar_t *string2); characters from the string
pointed to by string2.
Date and time conversion.
wchar_t *wcsptime ( const
Equivalent to strptime(),
wcsptime wchar.h wchar_t *buf, const wchar_t
except that it uses wide
*format, struct tm *tm );
characters.
wchar_t *wcsrchr(const Locates the last occurrence
wcsrchr wchar.h wchar_t *string, of character in the string
wchar_t character); pointed to by string.
wcsrtombs4 wchar.h size_t wcsrtombs (char *dst, Converts wide character
const wchar_t **src, size_t len, string to multibyte string.
mbstate_t *ps); (Restartable version of
wcstombs.)
Computes the number of wide
characters in the initial
size_t wcsspn(const segment of the string pointed
wcsspn wchar.h wchar_t *string1, const to by string1, which consists
wchar_t *string2); entirely of wide characters
from the string pointed to
by string2.
wchar_t *wcsstr(const
Locates the first occurrence
wcsstr wchar.h wchar_t *wcs1, const
of wcs2 in wcs1.
wchar_t *wcs2);
Converts the initial portion of
double wcstod(const
the wide-character string
wcstod wchar.h wchar_t *nptr,
pointed to by nptr to a double
wchar_t **endptr);
value.
Converts the initial portion of
_Decimal32 wcstod32(const the wide-character string
wcstod32 wchar.h wchar_t *nptr, pointed to by nptr to a single-
wchar_t **endptr); precision decimal floating-
point value.
Converts the initial portion of
_Decimal64 wcstod64(const the wide-character string
wcstod64 wchar.h wchar_t *nptr, pointed to by nptr to a
wchar_t **endptr); double-precision decimal
floating-point value.
Converts the initial portion of
_Decimal128 wcstod128(const the wide-character string
wcstod128 wchar.h wchar_t *nptr, pointed to by nptr to a quad-
wchar_t **endptr); precision decimal floating-
point value.
Converts the initial portion of
float wcstof(const wchar_t *nptr, the wide-character string
wcstof wchar.h
wchar_t **endptr); pointed to by nptr to a float
value.
Breaks wcs1 into a sequence
wchar_t *wcstok(wchar_t *wcs1, of tokens, each of which is
wcstok wchar.h const wchar_t *wcs2, delimited by a wide character
wchar_t **ptr) from the wide string pointed
to by wcs2.
Converts the initial portion of
long int wcstol(const
the wide-character string
wcstol wchar.h wchar_t *nptr, wchar_t **endptr,
pointed to by nptr to a long
int base);
integer value.
Converts the initial portion of
long double wcstold(const
the wide-character string
wcstold wchar.h wchar_t *nptr,
pointed to by nptr to a long
wchar_t **endptr);
double value.
size_t wcstombs(char *dest, Converts the
wcstombs stdlib.h const wchar_t *string, wchar_t string into a
size_t count); multibyte string dest.
Converts the initial portion of
unsigned long int wcstoul(const
the wide-character string
wcstoul wchar.h wchar_t *nptr, wchar_t **endptr,
pointed to by nptr to an
int base);
unsigned long integer value.
Transforms a wide-character
string to values which
size_t wcsxfrm (wchar_t *wcs1, represent character collating
wcsxfrm4 wchar.h
const wchar_t *wcs2, size_t n); weights and places the
resulting wide-character
string into an array.
Determines
whether wc corresponds to a
member of the extended
stdarg.h
wctob int wctob(wint_t wc); character set whose multibyte
wchar.h
character representation is a
single byte when in the initial
shift state.
Converts the wchar_t value
int wctomb(char *string,
wctomb stdlib.h of character into a
wchar_t character);
multibyte string.
Constructs a value with type
wctrans_t that describes a
wctrans_t wctrans(const
wctrans wctype.h mapping between wide
char *property);
characters identified by the
string argument property.
wctype_t wctype (const Obtains handle for character
wctype4 wchar.h
char *property); property classification.
int wcswidth(const Determine the display width
wcwidth wchar.h
wchar_t *pwcs, size_t n); of a wide character string.
Locates the first occurrence
wchar_t *wmemchr(const of c in the initial n wide
wmemchr wchar.h
wchar_t *s, wchar_t c, size_t n); characters of the object
pointed to by s.
Compares the first n wide
int wmemcmp(const characters of the object
wmemcmp wchar.h wchar_t *s1, const wchar_t *s2, pointed to by s1 to the
size_t n); first n characters of the object
pointed to by s2.
Copies n wide characters
wchar_t
from the object pointed to
wmemcpy wchar.h *wmemcpy(wchar_t *s1, const
by s2 to the object pointed to
wchar_t *s2, size_t n);
by s1.
Copies n wide characters
wchar_t
from the object pointed to
wmemmove wchar.h *wmemmove(wchar_t *s1, const
by s2 to the object pointed to
wchar_t *s2, size_t n);
by s1.
Copies the value of c into
wchar_t *wmemset(wchar_t *s, each of the first n wide
wmemset wchar.h
wchar_t c, size_t n); characters of the object
pointed to by s.
Equivalent to fwprintf with
int wprintf(const the argument stdout
wprintf6 wchar.h
wchar_t *format, arg-list); interposed before the
arguments to wprintf.
Equivalent to fwscanf with
int wscanf(const the argument stdin interposed
wscanf6 wchar.h
wchar_t *format, arg-list); before the arguments of
wscanf.
Calculates the Bessel function
y0 math.h double y0(double x); value of the second kind of
order 0.
Calculates the Bessel function
y1 math.h double y1(double x); value of the second kind of
order 1.
Calculates the Bessel function
yn math.h double yn(int n, double x); value of the second kind of
order n.