stdlib.ch
Declarations
Returns
Integer value corresponding to the contents of str on success. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/atoi
See Also
- https:en.cppreference.com/w/c/string/byte/atoi
Returns
Integer value corresponding to the contents of str on success. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/atoi
See Also
- https:en.cppreference.com/w/c/string/byte/atoi
Returns
Integer value corresponding to the contents of str on success. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/atoi
See Also
- https:en.cppreference.com/w/c/string/byte/atoi
Parameters
- str pointer to the null-terminated byte string to be interpreted, TODO str restricted @param str_end pointer to a pointer to character. TODO str_end restricted @param base base of the interpreted integer value @return If successful, an integer value corresponding to the contents of str is returned. If the converted value falls out of range of corresponding return type, a range error occurs (setting errno to ERANGE) and LONG_MAX, LONG_MIN, LLONG_MAX or LLONG_MIN is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtol
- str_end pointer to a pointer to character. TODO str_end restricted @param base base of the interpreted integer value @return If successful, an integer value corresponding to the contents of str is returned. If the converted value falls out of range of corresponding return type, a range error occurs (setting errno to ERANGE) and LONG_MAX, LONG_MIN, LLONG_MAX or LLONG_MIN is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtol
- base base of the interpreted integer value @return If successful, an integer value corresponding to the contents of str is returned. If the converted value falls out of range of corresponding return type, a range error occurs (setting errno to ERANGE) and LONG_MAX, LONG_MIN, LLONG_MAX or LLONG_MIN is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtol
Returns
If successful, an integer value corresponding to the contents of str is returned. If the converted value falls out of range of corresponding return type, a range error occurs (setting errno to ERANGE) and LONG_MAX, LONG_MIN, LLONG_MAX or LLONG_MIN is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtol
See Also
- https:en.cppreference.com/w/c/string/byte/strtol
Parameters
- str pointer to the null-terminated byte string to be interpreted, TODO str restricted @param str_end pointer to a pointer to character. TODO str_end restricted @param base base of the interpreted integer value @return If successful, an integer value corresponding to the contents of str is returned. If the converted value falls out of range of corresponding return type, a range error occurs (setting errno to ERANGE) and LONG_MAX, LONG_MIN, LLONG_MAX or LLONG_MIN is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtol
- str_end pointer to a pointer to character. TODO str_end restricted @param base base of the interpreted integer value @return If successful, an integer value corresponding to the contents of str is returned. If the converted value falls out of range of corresponding return type, a range error occurs (setting errno to ERANGE) and LONG_MAX, LONG_MIN, LLONG_MAX or LLONG_MIN is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtol
- base base of the interpreted integer value @return If successful, an integer value corresponding to the contents of str is returned. If the converted value falls out of range of corresponding return type, a range error occurs (setting errno to ERANGE) and LONG_MAX, LONG_MIN, LLONG_MAX or LLONG_MIN is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtol
Returns
If successful, an integer value corresponding to the contents of str is returned. If the converted value falls out of range of corresponding return type, a range error occurs (setting errno to ERANGE) and LONG_MAX, LONG_MIN, LLONG_MAX or LLONG_MIN is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtol
See Also
- https:en.cppreference.com/w/c/string/byte/strtol
Parameters
- str pointer to the null-terminated byte string to be interpreted TODO str restricted @param str_end pointer to a pointer to character, might be set to a position past the last character interpreted TODO str_end restricted @param base base of the interpreted integer value @return Integer value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtoul
- str_end pointer to a pointer to character, might be set to a position past the last character interpreted TODO str_end restricted @param base base of the interpreted integer value @return Integer value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtoul
- base base of the interpreted integer value @return Integer value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtoul
Returns
Integer value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtoul
See Also
- https:en.cppreference.com/w/c/string/byte/strtoul
Parameters
- str pointer to the null-terminated byte string to be interpreted TODO str restricted @param str_end pointer to a pointer to character, might be set to a position past the last character interpreted TODO str_end restricted @param base base of the interpreted integer value @return Integer value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtoul
- str_end pointer to a pointer to character, might be set to a position past the last character interpreted TODO str_end restricted @param base base of the interpreted integer value @return Integer value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtoul
- base base of the interpreted integer value @return Integer value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtoul
Returns
Integer value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and ULONG_MAX or ULLONG_MAX is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtoul
See Also
- https:en.cppreference.com/w/c/string/byte/strtoul
Parameters
- str pointer to the null-terminated byte string to be interpreted TODO restricted @param str_end pointer to a pointer to character. TODO restricted @return Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
- str_end pointer to a pointer to character. TODO restricted @return Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
Returns
Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
See Also
- https:en.cppreference.com/w/c/string/byte/strtof
Parameters
- str pointer to the null-terminated byte string to be interpreted TODO restricted @param str_end pointer to a pointer to character. TODO restricted @return Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
- str_end pointer to a pointer to character. TODO restricted @return Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
Returns
Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
See Also
- https:en.cppreference.com/w/c/string/byte/strtof
Parameters
- str pointer to the null-terminated byte string to be interpreted TODO restricted @param str_end pointer to a pointer to character. TODO restricted @return Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
- str_end pointer to a pointer to character. TODO restricted @return Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
Returns
Floating-point value corresponding to the contents of str on success. If the converted value falls out of range of corresponding return type, range error occurs (errno is set to ERANGE) and HUGE_VAL, HUGE_VALF or HUGE_VALL is returned. If no conversion can be performed, 0 is returned. @see https:en.cppreference.com/w/c/string/byte/strtof
See Also
- https:en.cppreference.com/w/c/string/byte/strtof
Parameters
- s - pointer to a character string to write to TODO restricted @param n - up to n - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- n - up to n - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
Returns
The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
See Also
- https:en.cppreference.com/w/c/string/byte/strfromf
Parameters
- s - pointer to a character string to write to TODO restricted @param n - up to n - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- n - up to n - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
Returns
The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
See Also
- https:en.cppreference.com/w/c/string/byte/strfromf
Parameters
- s - pointer to a character string to write to TODO restricted @param n - up to n - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- n - up to n - 1 characters may be written, plus the null terminator @param format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- format - pointer to a null-terminated byte string specifying how to interpret the data TODO restricted @param fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
- fp - floating-point value to convert @return The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
Returns
The number of characters that would have been written had n been sufficiently large, not counting the terminating null character. Thus, the null-terminated output has been completely written if and only if the returned value is both nonnegative and less than n. @see https:en.cppreference.com/w/c/string/byte/strfromf
See Also
- https:en.cppreference.com/w/c/string/byte/strfromf
Parameters
- n - integer value @return The absolute value of n (i.e. |n|), if it is representable. @see https:en.cppreference.com/w/c/numeric/math/abs
Returns
The absolute value of n (i.e. |n|), if it is representable. @see https:en.cppreference.com/w/c/numeric/math/abs
See Also
- https:en.cppreference.com/w/c/numeric/math/abs
Parameters
- n - integer value @return The absolute value of n (i.e. |n|), if it is representable. @see https:en.cppreference.com/w/c/numeric/math/abs
Returns
The absolute value of n (i.e. |n|), if it is representable. @see https:en.cppreference.com/w/c/numeric/math/abs
See Also
- https:en.cppreference.com/w/c/numeric/math/abs
Parameters
- n - integer value @return The absolute value of n (i.e. |n|), if it is representable. @see https:en.cppreference.com/w/c/numeric/math/abs
Returns
The absolute value of n (i.e. |n|), if it is representable. @see https:en.cppreference.com/w/c/numeric/math/abs
See Also
- https:en.cppreference.com/w/c/numeric/math/abs
Parameters
- x, y - integer values @return If both the remainder and the quotient can be represented as objects of the corresponding type (int, long, long long, intmax_t, respectively), returns both as an object of type div_t, ldiv_t, lldiv_t, imaxdiv_t @see https:en.cppreference.com/w/c/numeric/math/div
Returns
If both the remainder and the quotient can be represented as objects of the corresponding type (int, long, long long, intmax_t, respectively), returns both as an object of type div_t, ldiv_t, lldiv_t, imaxdiv_t @see https:en.cppreference.com/w/c/numeric/math/div
See Also
- https:en.cppreference.com/w/c/numeric/math/div
Parameters
- x, y - integer values @return If both the remainder and the quotient can be represented as objects of the corresponding type (int, long, long long, intmax_t, respectively), returns both as an object of type div_t, ldiv_t, lldiv_t, imaxdiv_t @see https:en.cppreference.com/w/c/numeric/math/div
Returns
If both the remainder and the quotient can be represented as objects of the corresponding type (int, long, long long, intmax_t, respectively), returns both as an object of type div_t, ldiv_t, lldiv_t, imaxdiv_t @see https:en.cppreference.com/w/c/numeric/math/div
See Also
- https:en.cppreference.com/w/c/numeric/math/div
Parameters
- x, y - integer values @return If both the remainder and the quotient can be represented as objects of the corresponding type (int, long, long long, intmax_t, respectively), returns both as an object of type div_t, ldiv_t, lldiv_t, imaxdiv_t @see https:en.cppreference.com/w/c/numeric/math/div
Returns
If both the remainder and the quotient can be represented as objects of the corresponding type (int, long, long long, intmax_t, respectively), returns both as an object of type div_t, ldiv_t, lldiv_t, imaxdiv_t @see https:en.cppreference.com/w/c/numeric/math/div
See Also
- https:en.cppreference.com/w/c/numeric/math/div
See Also
- https:en.cppreference.com/w/c/program/abort
See Also
- https:en.cppreference.com/w/c/program/exit
Parameters
- exit_code - exit status of the program @see https:en.cppreference.com/w/c/program/quick_exit
See Also
- https:en.cppreference.com/w/c/program/quick_exit
Parameters
- exit_code - exit status of the program @see https:en.cppreference.com/w/c/program/_Exit
See Also
- https:en.cppreference.com/w/c/program/_Exit
Parameters
- func - pointer to a function to be called on normal program termination @return 0 if the registration succeeds, nonzero value otherwise. @see https:en.cppreference.com/w/c/program/atexit
Returns
0 if the registration succeeds, nonzero value otherwise. @see https:en.cppreference.com/w/c/program/atexit
See Also
- https:en.cppreference.com/w/c/program/atexit
Parameters
- func - pointer to a function to be called on quick program termination @return 0 if the registration succeeds, nonzero value otherwise. @see https:en.cppreference.com/w/c/program/at_quick_exit
Returns
0 if the registration succeeds, nonzero value otherwise. @see https:en.cppreference.com/w/c/program/at_quick_exit
See Also
- https:en.cppreference.com/w/c/program/at_quick_exit
Parameters
- command - character string identifying the command to be run in the command processor. If a null pointer is given, command processor is checked for existence @return Implementation-defined value. If command is a null pointer, returns a nonzero value if and only if the command processor exists. @see https:en.cppreference.com/w/c/program/system
Returns
Implementation-defined value. If command is a null pointer, returns a nonzero value if and only if the command processor exists. @see https:en.cppreference.com/w/c/program/system
See Also
- https:en.cppreference.com/w/c/program/system
Parameters
- name - null-terminated character string identifying the name of the environmental variable to look for @return character string identifying the value of the environmental variable or null pointer if such variable is not found. @see https:en.cppreference.com/w/c/program/getenv
Returns
character string identifying the value of the environmental variable or null pointer if such variable is not found. @see https:en.cppreference.com/w/c/program/getenv
See Also
- https:en.cppreference.com/w/c/program/getenv
Parameters
- name - null-terminated character string identifying the name of the environmental variable to look for TODO restricted @param len - pointer to a user-provided location where getenv_s will store the length of the environment variable TODO restricted @param value - pointer to a user-provided character array where getenv_s will store the contents of the environment variable TODO restricted @param valuesz - maximum number of characters that getenv_s is allowed to write to dest (size of the buffer) @return zero if the environment variable was found, non-zero if it was not found or if a runtime constraint violation occurred. On any error, writes zero to *len (unless len is a null pointer). @see https:en.cppreference.com/w/c/program/getenv
- len - pointer to a user-provided location where getenv_s will store the length of the environment variable TODO restricted @param value - pointer to a user-provided character array where getenv_s will store the contents of the environment variable TODO restricted @param valuesz - maximum number of characters that getenv_s is allowed to write to dest (size of the buffer) @return zero if the environment variable was found, non-zero if it was not found or if a runtime constraint violation occurred. On any error, writes zero to *len (unless len is a null pointer). @see https:en.cppreference.com/w/c/program/getenv
- value - pointer to a user-provided character array where getenv_s will store the contents of the environment variable TODO restricted @param valuesz - maximum number of characters that getenv_s is allowed to write to dest (size of the buffer) @return zero if the environment variable was found, non-zero if it was not found or if a runtime constraint violation occurred. On any error, writes zero to *len (unless len is a null pointer). @see https:en.cppreference.com/w/c/program/getenv
- valuesz - maximum number of characters that getenv_s is allowed to write to dest (size of the buffer) @return zero if the environment variable was found, non-zero if it was not found or if a runtime constraint violation occurred. On any error, writes zero to *len (unless len is a null pointer). @see https:en.cppreference.com/w/c/program/getenv
Returns
zero if the environment variable was found, non-zero if it was not found or if a runtime constraint violation occurred. On any error, writes zero to *len (unless len is a null pointer). @see https:en.cppreference.com/w/c/program/getenv
See Also
- https:en.cppreference.com/w/c/program/getenv
Parameters
- p - pointer to query alignment @return The alignment value of p, or 0 if p is a null pointer value. @see https:en.cppreference.com/w/c/program/memalignment
Returns
The alignment value of p, or 0 if p is a null pointer value. @see https:en.cppreference.com/w/c/program/memalignment
See Also
- https:en.cppreference.com/w/c/program/memalignment
Parameters
- s - pointer to the multibyte character @param n - limit on the number of bytes in s that can be examined @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null charcter '\0'. If s is a null pointer, resets its internal conversion state to represent the initial shift state and(until C23) returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/mblen
- n - limit on the number of bytes in s that can be examined @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null charcter '\0'. If s is a null pointer, resets its internal conversion state to represent the initial shift state and(until C23) returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/mblen
Returns
If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null charcter '\0'. If s is a null pointer, resets its internal conversion state to represent the initial shift state and(until C23) returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/mblen
See Also
- https:en.cppreference.com/w/c/string/multibyte/mblen
Parameters
- pwc - pointer to the wide character for output @param s - pointer to the multibyte character @param n - limit on the number of bytes in s that can be examined @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null character '\0'. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/mbtowc
- s - pointer to the multibyte character @param n - limit on the number of bytes in s that can be examined @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null character '\0'. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/mbtowc
- n - limit on the number of bytes in s that can be examined @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null character '\0'. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/mbtowc
Returns
If s is not a null pointer, returns the number of bytes that are contained in the multibyte character or -1 if the first bytes pointed to by s do not form a valid multibyte character or 0 if s is pointing at the null character '\0'. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/mbtowc
See Also
- https:en.cppreference.com/w/c/string/multibyte/mbtowc
Parameters
- s - pointer to the character array for output @param wc - wide character to convert @param ssz - maximum number of bytes to write to s (size of the array s) @param status - pointer to an out-parameter where the result (length of the multibyte sequence or the shift sequence status) will be stored @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte representation of wc or -1 if wc is not a valid character. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/wctomb
- wc - wide character to convert @param ssz - maximum number of bytes to write to s (size of the array s) @param status - pointer to an out-parameter where the result (length of the multibyte sequence or the shift sequence status) will be stored @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte representation of wc or -1 if wc is not a valid character. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/wctomb
- ssz - maximum number of bytes to write to s (size of the array s) @param status - pointer to an out-parameter where the result (length of the multibyte sequence or the shift sequence status) will be stored @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte representation of wc or -1 if wc is not a valid character. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/wctomb
- status - pointer to an out-parameter where the result (length of the multibyte sequence or the shift sequence status) will be stored @return If s is not a null pointer, returns the number of bytes that are contained in the multibyte representation of wc or -1 if wc is not a valid character. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/wctomb
Returns
If s is not a null pointer, returns the number of bytes that are contained in the multibyte representation of wc or -1 if wc is not a valid character. If s is a null pointer, resets its internal conversion state to represent the initial shift state and returns 0 if the current multibyte encoding is not state-dependent (does not use shift sequences) or a non-zero value if the current multibyte encoding is state-dependent (uses shift sequences). @see https:en.cppreference.com/w/c/string/multibyte/wctomb
See Also
- https:en.cppreference.com/w/c/string/multibyte/wctomb
Parameters
- s - pointer to the character array for output @param wc - wide character to convert @param ssz - maximum number of bytes to write to s (size of the array s) @param status - pointer to an out-parameter where the result (length of the multibyte sequence or the shift sequence status) will be stored @return zero on success, in which case the multibyte representation of wc is stored in s and its length is stored in *status, or, if s is null, the shift sequence status is stored in status). Non-zero on encoding error or runtime constraint violation, in which case (size_t)-1 is stored in *status. The value stored in *status never exceeds MB_CUR_MAX @see https:en.cppreference.com/w/c/string/multibyte/wctomb
- wc - wide character to convert @param ssz - maximum number of bytes to write to s (size of the array s) @param status - pointer to an out-parameter where the result (length of the multibyte sequence or the shift sequence status) will be stored @return zero on success, in which case the multibyte representation of wc is stored in s and its length is stored in *status, or, if s is null, the shift sequence status is stored in status). Non-zero on encoding error or runtime constraint violation, in which case (size_t)-1 is stored in *status. The value stored in *status never exceeds MB_CUR_MAX @see https:en.cppreference.com/w/c/string/multibyte/wctomb
- ssz - maximum number of bytes to write to s (size of the array s) @param status - pointer to an out-parameter where the result (length of the multibyte sequence or the shift sequence status) will be stored @return zero on success, in which case the multibyte representation of wc is stored in s and its length is stored in *status, or, if s is null, the shift sequence status is stored in status). Non-zero on encoding error or runtime constraint violation, in which case (size_t)-1 is stored in *status. The value stored in *status never exceeds MB_CUR_MAX @see https:en.cppreference.com/w/c/string/multibyte/wctomb
- status - pointer to an out-parameter where the result (length of the multibyte sequence or the shift sequence status) will be stored @return zero on success, in which case the multibyte representation of wc is stored in s and its length is stored in *status, or, if s is null, the shift sequence status is stored in status). Non-zero on encoding error or runtime constraint violation, in which case (size_t)-1 is stored in *status. The value stored in *status never exceeds MB_CUR_MAX @see https:en.cppreference.com/w/c/string/multibyte/wctomb
Returns
zero on success, in which case the multibyte representation of wc is stored in s and its length is stored in *status, or, if s is null, the shift sequence status is stored in status). Non-zero on encoding error or runtime constraint violation, in which case (size_t)-1 is stored in *status. The value stored in *status never exceeds MB_CUR_MAX @see https:en.cppreference.com/w/c/string/multibyte/wctomb
See Also
- https:en.cppreference.com/w/c/string/multibyte/wctomb
Parameters
- dst - pointer to wide character array where the wide string will be stored @param src - pointer to the first element of a null-terminated multibyte string to convert @param len - number of wide characters available in the array pointed to by dst @param dstsz - max number of wide characters that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return On success, returns the number of wide characters, excluding the terminating L'\0', written to the destination array. On conversion error (if invalid multibyte character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
- src - pointer to the first element of a null-terminated multibyte string to convert @param len - number of wide characters available in the array pointed to by dst @param dstsz - max number of wide characters that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return On success, returns the number of wide characters, excluding the terminating L'\0', written to the destination array. On conversion error (if invalid multibyte character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
- len - number of wide characters available in the array pointed to by dst @param dstsz - max number of wide characters that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return On success, returns the number of wide characters, excluding the terminating L'\0', written to the destination array. On conversion error (if invalid multibyte character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
- dstsz - max number of wide characters that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return On success, returns the number of wide characters, excluding the terminating L'\0', written to the destination array. On conversion error (if invalid multibyte character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
- retval - pointer to a size_t object where the result will be stored @return On success, returns the number of wide characters, excluding the terminating L'\0', written to the destination array. On conversion error (if invalid multibyte character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
Returns
On success, returns the number of wide characters, excluding the terminating L'\0', written to the destination array. On conversion error (if invalid multibyte character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
See Also
- https:en.cppreference.com/w/c/string/multibyte/mbstowcs
Parameters
- dst - pointer to wide character array where the wide string will be stored @param src - pointer to the first element of a null-terminated multibyte string to convert @param len - number of wide characters available in the array pointed to by dst @param dstsz - max number of wide characters that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return zero on success (in which case the number of wide characters excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to L'\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
- src - pointer to the first element of a null-terminated multibyte string to convert @param len - number of wide characters available in the array pointed to by dst @param dstsz - max number of wide characters that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return zero on success (in which case the number of wide characters excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to L'\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
- len - number of wide characters available in the array pointed to by dst @param dstsz - max number of wide characters that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return zero on success (in which case the number of wide characters excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to L'\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
- dstsz - max number of wide characters that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return zero on success (in which case the number of wide characters excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to L'\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
- retval - pointer to a size_t object where the result will be stored @return zero on success (in which case the number of wide characters excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to L'\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
Returns
zero on success (in which case the number of wide characters excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to L'\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/mbstowcs
See Also
- https:en.cppreference.com/w/c/string/multibyte/mbstowcs
Parameters
- dst - pointer to narrow character array where the multibyte character will be stored @param src - pointer to the first element of a null-terminated wide string to convert @param len - number of bytes available in the array pointed to by dst @param dstsz - max number of bytes that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by dst. On conversion error (if invalid wide character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
- src - pointer to the first element of a null-terminated wide string to convert @param len - number of bytes available in the array pointed to by dst @param dstsz - max number of bytes that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by dst. On conversion error (if invalid wide character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
- len - number of bytes available in the array pointed to by dst @param dstsz - max number of bytes that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by dst. On conversion error (if invalid wide character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
- dstsz - max number of bytes that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by dst. On conversion error (if invalid wide character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
- retval - pointer to a size_t object where the result will be stored @return On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by dst. On conversion error (if invalid wide character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
Returns
On success, returns the number of bytes (including any shift sequences, but excluding the terminating '\0') written to the character array whose first element is pointed to by dst. On conversion error (if invalid wide character was encountered), returns (size_t)-1. @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
See Also
- https:en.cppreference.com/w/c/string/multibyte/wcstombs
Parameters
- dst - pointer to narrow character array where the multibyte character will be stored @param src - pointer to the first element of a null-terminated wide string to convert @param len - number of bytes available in the array pointed to by dst @param dstsz - max number of bytes that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return Returns zero on success (in which case the number of bytes excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to '\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
- src - pointer to the first element of a null-terminated wide string to convert @param len - number of bytes available in the array pointed to by dst @param dstsz - max number of bytes that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return Returns zero on success (in which case the number of bytes excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to '\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
- len - number of bytes available in the array pointed to by dst @param dstsz - max number of bytes that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return Returns zero on success (in which case the number of bytes excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to '\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
- dstsz - max number of bytes that will be written (size of the dst array) @param retval - pointer to a size_t object where the result will be stored @return Returns zero on success (in which case the number of bytes excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to '\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
- retval - pointer to a size_t object where the result will be stored @return Returns zero on success (in which case the number of bytes excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to '\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
Returns
Returns zero on success (in which case the number of bytes excluding terminating zero that were, or would be written to dst, is stored in *retval), non-zero on error. In case of a runtime constraint violation, stores (size_t)-1 in *retval (unless retval is null) and sets dst[0] to '\0' (unless dst is null or dstmax is zero or greater than RSIZE_MAX) @see https:en.cppreference.com/w/c/string/multibyte/wcstombs
See Also
- https:en.cppreference.com/w/c/string/multibyte/wcstombs
Returns
Pseudo-random integer value between 0 and RAND_MAX, inclusive. @note There are no guarantees as to the quality of the random sequence produced. In the past, some implementations of rand() have had serious shortcomings in the randomness, distribution and period of the sequence produced (in one well-known example, the low-order bit simply alternated between 1 and 0 between calls). rand() is not recommended for serious random-number generation needs, like cryptography. @see https:en.cppreference.com/w/c/numeric/random/rand
See Also
- https:en.cppreference.com/w/c/numeric/random/rand
Parameters
- seed - the seed value @note Generally speaking, the pseudo-random number generator should only be seeded once, before any calls to rand(), and the start of the program. It should not be repeatedly seeded, or reseeded every time you wish to generate a new batch of pseudo-random numbers. Standard practice is to use the result of a call to time(0) as the seed. However, time() returns a time_t value, and time_t is not guaranteed to be an integral type. In practice, though, every major implementation defines time_t to be an integral type, and this is also what POSIX requires. @see https:en.cppreference.com/w/c/numeric/random/srand
See Also
- https:en.cppreference.com/w/c/numeric/random/srand
Returns
double value corresponding to the contents of str on success. If the converted value falls out of range of the return type, the return value is undefined. If no conversion can be performed, 0.0 is returned. @see https:en.cppreference.com/w/c/string/byte/atof
See Also