Access the C Standard Library

Standard library C functions exposed to Python.

Most of the functions in the C standard library are included in a single shared libraryAn executable file containing definitions (function/variables/...) but no main method. which is part of your operating system (see the table below). The cslug.stdlib module loads and exposes the contents of this library to be directly called from Python.

Platform

Library/location

Linux

A combination of libc.so and, if present and not just aliases of libc.so, libm.so and libdl.so.

Windows >11

C:\Windows\system32\ucrt.dll

Windows 7-10

The somewhat barren C:\Windows\system32\msvcrt.dll.

macOS

libc.dylib.

MSYS2

msys-2.0.dll, requires cslug >= 0.5.1 for newer versions of Python.

Cygwin

cygwin1.dll, requires cslug >= 0.4.0.

FreeBSD

A combination of libc.so and libm.so.

OpenBSD

A combination of libc.so and libm.so.

Android

A combination of libc.so and libm.so.

Not every function is made available. A function is excluded if:

  • It is not available on your current platform.

  • It uses types which are unavailable to ctypes.

  • It's a macro, meaning that it's refactored away at compile time and doesn't exist in any binariesNick-name for shared library. format.


The functions on this page are grouped by the header file they are included from. Each function has a row of icons corresponding to the platforms that it can be found on. See the key below for which platform each icon symbolises:

  • Android Android

  • Cygwin Cygwin (UNIX emulator for Windows).

  • FreeBSD FreeBSD

  • glibc Linux Linux distributions using GNU libc (i.e. the vast majority of them)

  • macOS macOS (x86_64 or arm64)

  • MSYS2 MSYS2 (another UNIX emulator for Windows)

  • musl Linux Linux distributions using musl libc (most famously Alpine)

  • NetBSD NetBSD

  • OpenBSD OpenBSD

  • Windows MSVCRT Windows 7 to 10 (using the MSVC runtime)

  • Windows UCRT Windows 11 (using the new Universal C Runtime)

Credits: The textual descriptions on this page were taken from here.


assert.h

Functions defined with #include <assert.h>.

void assert(int expression);
blank blank blank blank blank blank blank blank blank blank blank
Prints a diagnostic message and ends the program if the expression is false.

ctype.h

Functions defined with #include <ctype.h>.

int isalnum(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is alphanumeric.
int isalpha(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is alphabetic.
int isascii(int c);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is within the 7-bit US-ASCII range.
int isblank(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a blank or tab character.
int iscntrl(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a control character.
int isdigit(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a decimal digit.
int isgraph(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a printable character excluding the space.
int islower(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a lowercase letter.
int isprint(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a printable character including the space.
int ispunct(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a punctuation character.
int isspace(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a whitespace character.
int isupper(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is an uppercase letter.
int toascii(int c);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts c to a character in the 7-bit US-ASCII character set.
int tolower(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts c to lowercase.
int toupper(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts c to uppercase.

locale.h

Functions defined with #include <locale.h>.

struct lconv *localeconv(void);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats numeric quantities in struct lconv according to the current locale.
char *setlocale(int category, const char *locale);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Changes or queries variables defined in the locale.
struct wcslconv *wcslocaleconv(void);
blank blank blank blank blank blank blank blank blank blank blank
Formats numeric quantities in struct wcslconv according to the current locale.

math.h

Functions defined with #include <math.h>.

double acos(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the arc cosine of x.
double asin(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the arc sine of x.
double atan(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the arc tangent of x.
double atan2(double y, double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the arc tangent of y/x.
double ceil(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the double value representing the smallest integer that is greater than or equal to x.
double cos(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the cosine of x.
double cosh(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the hyperbolic cosine of x.
double erf(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the error function of x.
double erfc(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the error function for large values of x.
double exp(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the exponential function of a floating-point argument x.
double fabs(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the absolute value of a floating-point argument x.
double floor(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the floating-point value representing the largest integer less than or equal to x.
double fmod(double x, double y);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the floating-point remainder of x/y.
double frexp(double x, int *expptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Separates a floating-point number into its mantissa and exponent.
double gamma(double x);
glibc Linux macOS blank blank NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Computes the Gamma Function
double hypot(double side1, double side2);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the hypotenuse of a right-angled triangle with sides of length side1 and side2.
double j0(double x);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the Bessel function value of the first kind of order 0.
double j1(double x);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the Bessel function value of the first kind of order 1.
double jn(int n, double x);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the Bessel function value of the first kind of order n.
double ldexp(double x, int exp);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Returns the value of x multiplied by (2 to the power of exp).
double log(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the natural logarithm of x.
double log10(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the base 10 logarithm of x.
double modf(double x, double *intptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Breaks down the floating-point value x into fractional and integral parts.
double nextafter(double x, double y);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the next representable value after x in the direction of y.
long double nextafterl(long double x, long double y);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the next representable value after x in the direction of y.
double nexttoward(double x, long double y);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the next representable value after x in the direction of y.
long double nexttowardl(long double x, long double y);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the next representable value after x in the direction of y.
double pow(double x, double y);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the value x to the power y.
double sin(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the sine of x.
double sinh(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the hyperbolic sine of x.
double sqrt(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the square root of x.
double tan(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the tangent of x.
double tanh(double x);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the hyperbolic tangent of x.
double y0(double x);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the Bessel function value of the second kind of order 0.
double y1(double x);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the Bessel function value of the second kind of order 1.
double yn(int n, double x);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the Bessel function value of the second kind of order n.

regex.h

Functions defined with #include <regex.h>.

int regcomp(regex_t *preg, const char *pattern, int cflags);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Compiles the source regular 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 regex_t *preg, char *errbuf, size_t errbuf_size);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Finds the description for the error code errcode for the regular expression preg.
int regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t *pmatch, int eflags);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Compares the null-ended string string against the compiled regular expression preg to find a match between the two.
void regfree(regex_t *preg);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Frees any memory that was allocated by regcomp to implement the regular expression preg.

signal.h

Functions defined with #include <signal.h>.

int raise(int sig);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Sends the signal sig to the running program.

stdarg.h

Functions defined with #include <stdarg.h>.

void va_start(va_list *arg_ptr, variable_name*);
blank blank blank blank blank blank blank blank blank blank blank
Initializes arg_ptr for subsequent use by va_arg and va_end.
int vfprintf(FILE *stream, const char *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats and prints characters to the output stream using a variable number of arguments.
int vfwprintf(FILE *stream, const wchar_t *format, *va_list arg*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Equivalent to fwprintf, except that the variable argument list is replaced by arg.
int vfwscanf(FILE *stream, const wchar_t *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads wide data from a specified stream into locations given by a variable number of arguments.
int vscanf(const char *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads data from stdin into locations given by a variable number of arguments.
int vsscanf(const char*buffer, const char *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads data from a buffer into locations given by a variable number of arguments.
int vswprintf(wchar_t *wcsbuffer, size_t n, const wchar_t *format, *va_list arg*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats and stores a series of wide characters and values in the buffer wcsbuffer.
int vwprintf(const wchar_t *format, *va_list arg*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Equivalent to wprintf, except that the variable argument list is replaced by arg.
int wctob(wint_t wc);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Determines whether wc corresponds to a member of the extended character set whose multibyte character representation is a single byte when in the initial shift state.

stdio.h

Functions defined with #include <stdio.h>.

wint_t btowc(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Determines whether c constitutes a valid multibyte character in the initial shift state.
void clearerr(FILE *stream);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Resets the error indicators and the end-of-file indicator for stream.
int fclose(FILE *stream);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Closes the specified stream.
FILE *fdopen(int handle, const char *type);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Associates an input or output stream with the file identified by handle.
int feof(FILE *stream);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests whether the end-of-file flag is set for a given stream.
int ferror(FILE *stream);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Tests for an error indicator in reading from or writing to stream.
int fflush(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Writes the contents of the buffer associated with the output stream.
int fgetc(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads a single unsigned character from the input stream.
int fgetpos(FILE *stream, fpos_t *pos);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Stores the current position of the file pointer associated with stream into the object pointed to by pos.
char *fgets(char *string, int n, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads a string from the input stream.
wint_t fgetwc(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads the next multibyte character from the input stream pointed to by stream.
wchar_t *fgetws(wchar_t *wcs, int n, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads wide characters from the stream into the array pointed to by wcs.
int fileno(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Determines the file handle currently associated with stream.
FILE *fopen(const char *filename, const char *mode);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Opens the specified file.
int fprintf(FILE *stream, const char **format-string*, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats and prints characters and values to the output stream.
int fputc(int c, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Prints a character to the output stream.
int fputs(const char *string, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Copies a string to the output stream.
wint_t fputwc(wchar_t wc, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the wide character wc to a multibyte character and writes it to the output stream pointed to by stream at the current position.
int fputws(const wchar_t *wcs, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the wide-character string wcs to a multibyte-character string and writes it to stream as a multibyte character string.
size_t fread(void *buffer, size_t size, size_t count, FILE *stream);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Reads up to count items of size length from the input stream, and stores them in buffer.
FILE *freopen(const char *filename, const char *mode, FILE *stream);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Closes stream, and reassigns it to the file specified.
int fscanf(FILE *stream, const char **format-string*, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Reads data from stream into locations given by arg-list.
int fseek(FILE *stream, long int offset, int origin);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Changes the current file position associated with stream to a new location.
int fsetpos(FILE *stream, const fpos_t *pos);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Moves the current file position to a new location determined by pos.
long int ftell(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Gets the current position of the file pointer.
int fwide(FILE *stream, int mode);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Determines the orientation of the stream pointed to by stream.
int fwprintf(FILE *stream, const wchar_t *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Writes output to the stream pointed to by stream.
size_t fwrite(const void *buffer, size_t size,size_t count, FILE *stream);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Writes up to count items of size length from buffer to stream.
int fwscanf(FILE *stream, const wchar_t *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads input from the stream pointed to by stream.
int getc(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads a single character from the input stream.
int getchar(void);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads a single character from stdin.
char *gets(char *buffer);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT blank MSYS2 Cygwin Android blank
Reads a string from stdin, and stores it in buffer.
wint_t getwc(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads the next multibyte character from stream, converts it to a wide character and advances the associated file position indicator for stream.
void perror(const char *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Prints an error message to stderr.
int printf(const char **format-string*, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats and prints characters and values to stdout.
int putc(int c, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Prints c to the output stream.
int putchar(int c);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Prints c to stdout.
int puts(const char *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Prints a string to stdout.
int remove(const char *filename);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Deletes the file specified by filename.
int rename(const char *oldname, const char *newname);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Renames the specified file.
void rewind(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Repositions the file pointer associated with stream to the beginning of the file.
int scanf(const char **format-string*, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Reads data from stdin into locations given by arg-list.
void setbuf(FILE *stream, char *buffer);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Controls buffering for stream.
int setvbuf(FILE *stream, char *buf, int type, size_t size);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Controls buffering and buffer size for stream.
int sprintf(char *buffer, const char **format-string*, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats and stores characters and values in buffer.
int sscanf(const char *buffer, const char *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Reads data from buffer into the locations given by arg-list.
FILE *tmpfile(void);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Creates a temporary binary file and opens it.
char *tmpnam(char *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Generates a temporary file name.
int ungetc(int c, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Pushes c back onto the input stream.
wint_t ungetwc(wint_t wc, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Pushes the wide character wc back onto the input stream.
int vfprintf(FILE *stream, const char *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats and prints characters to the output stream using a variable number of arguments.
int vfwprintf(FILE *stream, const wchar_t *format, *va_list arg*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Equivalent to fwprintf, except that the variable argument list is replaced by arg.
int vfwscanf(FILE *stream, const wchar_t *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads wide data from a specified stream into locations given by a variable number of arguments.
int vscanf(const char *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads data from stdin into locations given by a variable number of arguments.
int vsscanf(const char*buffer, const char *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads data from a buffer into locations given by a variable number of arguments.
int vswscanf(const wchar_t *buffer, const wchar_t *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads wide data from a buffer into locations given by a variable number of arguments.
int vwscanf(const wchar_t *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads wide data from stdin into locations given by a variable number of arguments.

stdlib.h

Functions defined with #include <stdlib.h>.

void abort(void);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Stops a program abnormally.
int abs(int n);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the absolute value of an integer argument n.
double atof(const char *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts string to a double-precision floating-point value.
int atoi(const char *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts string to an integer.
long int atol(const char *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts string to a long integer.
void *calloc(size_t num, size_t size);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Reserves storage space for an array of num elements, each of size size, and initializes the values of all elements to 0.
void exit(int status);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Ends a program normally.
void free(void *ptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Frees a block of storage.
char *getenv(const char *varname);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Searches environment variables for varname.
long int labs(long int n);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the absolute value of n.
void *malloc(size_t size);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Reserves a block of storage.
int mblen(const char *string, size_t n);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Determines the length of a multibyte character string.
size_t mbstowcs(wchar_t *pwc, const char *string, size_t n);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the multibyte characters in string to their corresponding wchar_t codes, and stores not more than n codes in pwc.
int mbtowc(wchar_t *pwc, const char *string, size_t n);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Stores the wchar_t code corresponding to the first n bytes of multibyte character string into the wchar_t character pwc.
int *putenv(const char *varname);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Sets the value of an environment variable by altering an existing variable or creating a new one.
int rand(void);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Returns a pseudo-random integer.
int rand_r(void);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Returns a pseudo-random integer. (Restartable version)
void *realloc(void *ptr, size_t size);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Changes the size of a previously reserved storage block.
void srand(unsigned int seed);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Sets the seed for the pseudo-random number generator.
double strtod(const char *nptr, char **endptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts nptr to a double precision value.
float strtof(const char *nptr, char **endptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts nptr to a float value.
long int strtol(const char *nptr, char **endptr, int base);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts nptr to a signed long integer.
long double strtold(const char *nptr, char **endptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts nptr to a long double value.
unsigned long int strtoul(const char *string1, char **string2, int base);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts string1 to an unsigned long integer.
int system(const char *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Passes string to the system command analyzer.
size_t wcstombs(char *dest, const wchar_t *string, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the wchar_t string into a multibyte string dest.
int wctomb(char *string, wchar_t character);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the wchar_t value of character into a multibyte string.

string.h

Functions defined with #include <string.h>.

void *memchr(const void *buf, int c, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Searches the first count bytes of buf for the first occurrence of c converted to an unsigned character.
int memcmp(const void *buf1, const void *buf2, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Compares up to count bytes of buf1 and buf2.
void *memcpy(void *dest, const void *src, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Copies count bytes of src to dest.
void *memmove(void *dest, const void *src, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Copies count bytes of src to dest. Allows copying between objects that overlap.
void *memset(void *dest, int c, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Sets count bytes of dest to a value c.
char *strcat(char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Concatenates string2 to string1.
char *strchr(const char *string, int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the first occurrence of c in string.
int strcmp(const char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Compares the value of string1 to string2.
int strcoll(const char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Compares two strings using the collating sequence in the current locale.
char *strcpy(char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Copies string2 into string1.
size_t strcspn(const char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Returns the length of the initial substring of string1 consisting of characters not contained in string2.
char *strerror(int errnum);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Maps the error number in errnum to an error message string.
size_t strlen(const char *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Calculates the length of string.
char *strncat(char *string1, const char *string2, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Concatenates up to count characters of string2 to string1.
int strncmp(const char *string1, const char *string2, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Compares up to count characters of string1 and string2.
char *strncpy(char *string1, const char *string2, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Copies up to count characters of string2 to string1.
char *strpbrk(const char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the first occurrence in string1 of any character in string2.
char *strrchr(const char *string, int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the last occurrence of c in string.
size_t strspn(const char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Returns the length of the initial substring of string1 consisting of characters contained in string2.
char *strstr(const char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Returns a pointer to the first occurrence of string2 in string1.
char *strtok(char *string1, const char *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the next token in string1 delimited by the next character in string2.
char *strtok_r(char *string, const char *seps, char **lasts);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the next token in string delimited by the next character in seps. (Restartable version of strtok.)
size_t strxfrm(char *string1, const char *string2, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts string2 and places the result in string1. The conversion is determined by the program's current locale.

strings.h

Functions defined with #include <strings.h>.

int srtcasecmp(const char *string1, const char *string2);
blank blank blank blank blank blank blank blank blank blank blank
Compares strings without case sensitivity.
int strncasecmp(const char *string1, const char *string2, size_t count);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Compares strings without case sensitivity.

time.h

Functions defined with #include <time.h>.

char *asctime(const struct tm *time);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the time that is stored as a structure to a character string.
char *asctime_r (const struct tm *tm, char *buf);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts tm that is stored as a structure to a character string. (Restartable version of asctime.)
char *ctime(const time_t *time);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts time to a character string.
char *ctime64(const time64_t *time);
blank blank blank blank blank blank blank blank blank blank blank
Converts time to a character string.
char *ctime_r(const time_t *time, char *buf);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts time to a character string. (Restartable version of ctime.)
char *ctime64_r(const time64_t *time, char *buf);
blank blank blank blank blank blank blank blank blank blank blank
Converts time to a character string. (Restartable version of ctime64.)
struct tm *gmtime(const time_t *time);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts a time value to a structure of type tm.
struct tm *gmtime64(const time64_t *time);
blank blank blank blank blank blank blank blank blank blank blank
Converts a time value to a structure of type tm.
struct tm *gmtime_r (const time_t *time, struct tm *result);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts a time value to a structure of type tm. (Restartable version of gmtime.)
struct tm *gmtime64_r (const time64_t *time, struct tm *result);
blank blank blank blank blank blank blank blank blank blank blank
Converts a time value to a structure of type tm. (Restartable version of gmtime64.)
struct tm *localtime(const time_t *timeval);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts timeval to a structure of type tm.
struct tm *localtime64(const time64_t *timeval);
blank blank blank blank blank blank blank blank blank blank blank
Converts timeval to a structure of type tm.
struct tm *localtime_r (const time_t *timeval, struct tm *result);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts a time value to a structure of type tm. (Restartable version of localtime.)
struct tm *localtime64_r (const time64_t *timeval, struct tm *result);
blank blank blank blank blank blank blank blank blank blank blank
Converts a time value to a structure of type tm. (Restartable version of localtime64.)
size_t strftime (char *dest, size_t maxsize, const char *format, const struct tm *timeptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Stores characters in an array pointed to by dest, according to the string determined by format.
char *strptime (const char *buf, const char *format, struct tm *tm);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Date and time conversion

wchar.h

Functions defined with #include <wchar.h>.

wint_t btowc(int c);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Determines whether c constitutes a valid multibyte character in the initial shift state.
wint_t fgetwc(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads the next multibyte character from the input stream pointed to by stream.
wchar_t *fgetws(wchar_t *wcs, int n, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads wide characters from the stream into the array pointed to by wcs.
wint_t fputwc(wchar_t wc, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the wide character wc to a multibyte character and writes it to the output stream pointed to by stream at the current position.
int fputws(const wchar_t *wcs, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the wide-character string wcs to a multibyte-character string and writes it to stream as a multibyte character string.
int fwide(FILE *stream, int mode);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Determines the orientation of the stream pointed to by stream.
int fwprintf(FILE *stream, const wchar_t *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Writes output to the stream pointed to by stream.
int fwscanf(FILE *stream, const wchar_t *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads input from the stream pointed to by stream.
wint_t getwc(FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads the next multibyte character from stream, converts it to a wide character and advances the associated file position indicator for stream.
wint_t getwchar(void);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads the next multibyte character from stdin, converts it to a wide character, and advances the associated file position indicator for stdin.
int mbrlen (const char *s, size_t n, mbstate_t *ps);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Determines the length of a multibyte character. (Restartable version of mblen.)
int mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Convert a multibyte character to a wide character (Restartable version of mbtowc.)
int mbsinit (const mbstate_t *ps);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Test state object ps for initial state.
size_t mbsrtowc (wchar_t *dst, const char **src, size_t len, mbstate_t *ps);
blank blank blank blank blank blank blank blank blank blank blank
Convert multibyte string to a wide character string. (Restartable version of mbstowcs.)
wint_t putwchar(wchar_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the wide character wc to a multibyte character and writes it to stdout.
int swprintf(wchar_t *wcsbuffer, size_t n, const wchar_t *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats and stores a series of wide characters and values into the wide-character buffer wcsbuffer.
int swscanf (const wchar_t *buffer, const wchar_t *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Reads data from buffer into the locations given by arg-list.
wint_t ungetwc(wint_t wc, FILE *stream);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Pushes the wide character wc back onto the input stream.
int vfwprintf(FILE *stream, const wchar_t *format, *va_list arg*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Equivalent to fwprintf, except that the variable argument list is replaced by arg.
int vswprintf(wchar_t *wcsbuffer, size_t n, const wchar_t *format, *va_list arg*);
glibc Linux macOS blank musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Formats and stores a series of wide characters and values in the buffer wcsbuffer.
int vswscanf(const wchar_t *buffer, const wchar_t *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads wide data from a buffer into locations given by a variable number of arguments.
int vwprintf(const wchar_t *format, *va_list arg*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Equivalent to wprintf, except that the variable argument list is replaced by arg.
int vwscanf(const wchar_t *format, *va_list arg_ptr*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Reads wide data from stdin into locations given by a variable number of arguments.
wchar_t *wcscat(wchar_t *string1, const wchar_t *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Appends a copy of the string pointed to by string2 to the end of the string pointed to by string1.
wchar_t *wcschr(const wchar_t *string, wchar_t character);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Searches the wide-character string pointed to by string for the occurrence of character.
int wcscmp(const wchar_t *string1, const wchar_t *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Compares two wide-character strings, string1 and string2.
int wcscoll (const wchar_t *wcs1, const wchar_t *wcs2);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Compares two wide-character strings using the collating sequence in the current locale.
wchar_t *wcscpy(wchar_t *string1, const wchar_t *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Copies the contents of string2 (including the ending wchar_t null character) into string1.
size_t wcscspn(const wchar_t *string1, const wchar_t *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Determines the number of wchar_t characters in the initial segment of the string pointed to by string1 that do not appear in the string pointed to by string2.
size_t wcsftime(wchar_t *wdest, size_t maxsize, const wchar_t *format, const struct tm *timeptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the time and date specification in the timeptr structure into a wide-character string.
size_t wcslen(const wchar_t *string);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Computes the number of wide-characters in the string pointed to by string.
wchar_t *wcsncat(wchar_t *string1, const wchar_t *string2, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Appends up to count wide characters from string2 to the end of string1, and appends a wchar_t null character to the result.
int wcsncmp(const wchar_t *string1, const wchar_t *string2, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Compares up to count wide characters in string1 to string2.
wchar_t *wcsncpy(wchar_t *string1, const wchar_t *string2, size_t count);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Copies up to count wide characters from string2 to string1.
wchar_t *wcspbrk(const wchar_t *string1, const wchar_t *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the first occurrence in the string pointed to by string1 of any wide characters from the string pointed to by string2.
wchar_t *wcsptime ( const wchar_t *buf, const wchar_t *format, struct tm *tm );
blank blank blank blank blank blank blank blank blank blank blank
Date and time conversion. Equivalent to strptime(), except that it uses wide characters.
wchar_t *wcsrchr(const wchar_t *string, wchar_t character);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the last occurrence of character in the string pointed to by string.
size_t wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts wide character string to multibyte string. (Restartable version of wcstombs.)
size_t wcsspn(const wchar_t *string1, const wchar_t *string2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Computes the number of wide characters in the initial segment of the string pointed to by string1, which consists entirely of wide characters from the string pointed to by string2.
wchar_t *wcsstr(const wchar_t *wcs1, const wchar_t *wcs2);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the first occurrence of wcs2 in wcs1.
double wcstod(const wchar_t *nptr, wchar_t **endptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the initial portion of the wide-character string pointed to by nptr to a double value.
float wcstof(const wchar_t *nptr, wchar_t **endptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the initial portion of the wide-character string pointed to by nptr to a float value.
wchar_t *wcstok(wchar_t *wcs1, const wchar_t *wcs2, wchar_t **ptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Breaks wcs1 into a sequence of tokens, each of which is delimited by a wide character from the wide string pointed to by wcs2.
long int wcstol(const wchar_t *nptr, wchar_t **endptr, int base);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the initial portion of the wide-character string pointed to by nptr to a long integer value.
long double wcstold(const wchar_t *nptr, wchar_t **endptr);
glibc Linux macOS Windows UCRT musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the initial portion of the wide-character string pointed to by nptr to a long double value.
unsigned long int wcstoul(const wchar_t *nptr, wchar_t **endptr, int base);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Converts the initial portion of the wide-character string pointed to by nptr to an unsigned long integer value.
size_t wcsxfrm (wchar_t *wcs1, const wchar_t *wcs2, size_t n);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Transforms a wide-character string to values which represent character collating weights and places the resulting wide-character string into an array.
int wctob(wint_t wc);
glibc Linux macOS Windows UCRT musl Linux NetBSD Windows MSVCRT OpenBSD MSYS2 Cygwin Android FreeBSD
Determines whether wc corresponds to a member of the extended character set whose multibyte character representation is a single byte when in the initial shift state.
int wcswidth(const wchar_t *pwcs, size_t n);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Determine the display width of a wide character string.
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Locates the first occurrence of c in the initial n wide characters of the object pointed to by s.
int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Compares the first n wide characters of the object pointed to by s1 to the first n characters of the object pointed to by s2.
wchar_t *wmemcpy(wchar_t *s1, const wchar_t *s2, size_t n);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Copies n wide characters from the object pointed to by s2 to the object pointed to by s1.
wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Copies n wide characters from the object pointed to by s2 to the object pointed to by s1.
wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Copies the value of c into each of the first n wide characters of the object pointed to by s.
int wprintf(const wchar_t *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Equivalent to fwprintf with the argument stdout interposed before the arguments to wprintf.
int wscanf(const wchar_t *format, *arg-list*);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Equivalent to fwscanf with the argument stdin interposed before the arguments of wscanf.

wctype.h

Functions defined with #include <wctype.h>.

int iswalnum (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any alphanumeric wide character.
int iswalpha (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any alphabetic wide character.
int iswblank (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any blank or tab wide character.
int iswcntrl (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Tests for any control wide character.
int iswdigit (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any decimal-digit wide character.
int iswgraph (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any printing wide character except for the wide-character space.
int iswlower (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any lowercase wide character.
int iswprint (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any printing wide character.
int iswpunct (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Test for a wide non-alphanumeric, non-space character.
int iswspace (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any wide character that corresponds to an implementation-defined set of wide characters for which iswalnum is false.
int iswupper (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any uppercase wide character.
int iswxdigit (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Checks for any hexadecimal digit character.
int isxdigit(int c);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Tests if c is a hexadecimal digit.
wint_t towlower (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts uppercase letter to lowercase letter.
wint_t towupper (wint_t wc);
glibc Linux macOS blank musl Linux NetBSD blank OpenBSD MSYS2 Cygwin Android FreeBSD
Converts lowercase letter to uppercase letter.