Typed Conversions

Typed conversions are of the form {prefix}(s?)n(r?)to{suffix}(s?)n. The prefix/suffix mapping can be found in the design documentation for conversions. This page covers the canonical conversions, which are from UTF-8/16/32 and the execution/wide execution encodings, to each other.

The “prefix” represents the source data. The “suffix” represents the destination data. The s stands for “string”, which means a bulk conversion. The r in the name stands for “restartable”, which means the function takes an cnc_mcstate_t pointer or similar state pointer. If there s is not present in the name, it is a single conversion function. If the r is not present in the name, it is the “non-restartable” version (the version that does not take the state).

Important

Non-restartable functions mean that a automatic storage duration object unique to the function invocation is created for you, before being used. If there is any necessary state left in the object before the function ends, it ends up being discarded and lost if the non-restartable functions are used.

Additional encodings not meant to be in the “core set” supported by a typical C or C++ implementation, and that have definitive names other than the Unicode encodings, can be found in the encodings documentation.

Important

Any function which does not convert to the execution encoding or wide execution encoding are guaranteed not to touch the locale (as defined by LC_CTYPE).

Warning

If an encoding conversion goes to or from either the execution encoding or the wide execution encoding, it may touch the locale which may perform a lock or other operations. If multiple function calls are used and LC_CTYPE is changed between any of those function calls without properly clearing the cnc_mcstate_t object to the initial shift sequence, the behavior of the functions become unspecified and DANGEROUS.

Bulk Conversion Functions

Note

The description for most of these functions is identical. Any relevant information is contained above.

cnc_mcerr cnc_mcsntomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcsnrtomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mcsntomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcsnrtomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mcsntoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcsnrtoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mcsntoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcsnrtoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mcsntoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcsnrtoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcsntomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcsnrtomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcsntomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcsnrtomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcsntoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcsnrtoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcsntoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcsnrtoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcsntoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcsnrtoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8sntomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8snrtomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8sntomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8snrtomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8sntoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8snrtoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8sntoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8snrtoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8sntoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8snrtoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16sntomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16snrtomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16sntomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16snrtomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16sntoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16snrtoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16sntoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16snrtoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16sntoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16snrtoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32sntomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32snrtomcsn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32sntomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32snrtomwcsn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32sntoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32snrtoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32sntoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32snrtoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32sntoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then pass it to the restartable version of this function. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32snrtoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Performs one unit of indivisible work repeatedly, or stops with an error. Will always stop just before the last complete successful translation of input to output, or will read all input and point to the end if there were no errors.

Remark

The documentation for the type ↔ encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

Single Conversion Functions

Note

The description for most of these functions is identical. Any relevant information is contained above.

cnc_mcerr cnc_mcntomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcnrtomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mcntomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcnrtomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mcntoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcnrtoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mcntoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcnrtoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mcntoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mcnrtoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcntomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcnrtomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcntomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcnrtomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcntoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcnrtoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcntoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcnrtoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_mwcntoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_mwcnrtoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_wchar_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8ntomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8nrtomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8ntomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8nrtomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8ntoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8nrtoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8ntoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8nrtoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c8ntoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c8nrtoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char8_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16ntomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16nrtomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16ntomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16nrtomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16ntoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16nrtoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16ntoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16nrtoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c16ntoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c16nrtoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char16_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32ntomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32nrtomcn(size_t *__p_maybe_dst_len, ztd_char_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32ntomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32nrtomwcn(size_t *__p_maybe_dst_len, ztd_wchar_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32ntoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32nrtoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32ntoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32nrtoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.

cnc_mcerr cnc_c32ntoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

The documentation for the type to encoding mapping can be found in the Relationship Table For Prefix/Suffix .

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

cnc_mcerr cnc_c32nrtoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const ztd_char32_t **__p_src, cnc_mcstate_t *__p_state)

Converts from the encoding given by __p_src’s character type to __p_maybe_dst’s character type. Only performs one unit of indivisible work, or returns an error.

Remark

This function will create an automatic storage duration cnc_mcstate_t object, initialize it to the initial shift sequence, and then use it with this function if __p_state is nullptr. This object is not recoverable in any way and is not shared, and therefore should only be used if the end-user is sure there is no state to the encoding they are working with (e.g., conversions between Unicode Transformation Formats (UTFs). It is NOT recommended to use this with the execution encoding and wide execution encodings, which may have shift state and could lead to invalid reads of later data without that shift state information from the cnc_mcstate_t object.)

Parameters
  • __p_maybe_dst_len[inout] A pointer to the size of the output buffer (in number of elements). If this is nullptr, then it will not update the count (and the output stream will automatically be considered large enough to handle all data, if __p_maybe_dst is not nullptr).

  • __p_maybe_dst[inout] A pointer to the pointer of the output buffer. If this or the pointer within are nullptr, than this function will not write output data (it may still decrement the value pointed to by __p_maybe_dst_len).

  • __p_src_len[inout] A pointer to the size of the input buffer (in number of elements). If this is nullptr or points to a value equivalent to 0, then the input is considered empty and cnc_mcerr_ok is returned.

  • __p_src[inout] A pointer to the pointer of the input buffer. If this or the pointer within are nullptr, than the input is considered empty and cnc_mcerr_ok is returned.

  • __p_state[inout] A pointer to the conversion state. If this is nullptr, a value-initialized (= {0} or similar) cnc_mcstate_t is used.