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.

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. 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).

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 funtion 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.

Bulk Conversion Functions

Note

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

cnc_mcerror cnc_mcsntomcsn(size_t *__p_maybe_dst_len, char **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcsnrtomcsn(size_t *__p_maybe_dst_len, char **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mcsntomwcsn(size_t *__p_maybe_dst_len, wchar_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcsnrtomwcsn(size_t *__p_maybe_dst_len, wchar_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mcsntoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcsnrtoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mcsntoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcsnrtoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mcsntoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcsnrtoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mwcsntomcsn(size_t *__p_maybe_dst_len, char **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcsnrtomcsn(size_t *__p_maybe_dst_len, char **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_mwcsntomwcsn(size_t *__p_maybe_dst_len, wchar_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcsnrtomwcsn(size_t *__p_maybe_dst_len, wchar_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_mwcsntoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcsnrtoc8sn(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_mwcsntoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcsnrtoc16sn(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_mwcsntoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcsnrtoc32sn(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_c8sntomcsn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c8snrtomcsn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_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_mcerror cnc_c8sntomwcsn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c8snrtomwcsn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror cnc_c16sntomcsn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c16snrtomcsn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_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_mcerror cnc_c16sntomwcsn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c16snrtomwcsn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror cnc_c32sntomcsn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c32snrtomcsn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_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_mcerror cnc_c32sntomwcsn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c32snrtomwcsn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror cnc_mcntomcn(size_t *__p_maybe_dst_len, char **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcnrtomcn(size_t *__p_maybe_dst_len, char **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mcntomwcn(size_t *__p_maybe_dst_len, wchar_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcnrtomwcn(size_t *__p_maybe_dst_len, wchar_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mcntoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcnrtoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mcntoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcnrtoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mcntoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mcnrtoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const char **__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_MCERROR_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_MCERROR_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_mcerror cnc_mwcntomcn(size_t *__p_maybe_dst_len, char **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcnrtomcn(size_t *__p_maybe_dst_len, char **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_mwcntomwcn(size_t *__p_maybe_dst_len, wchar_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcnrtomwcn(size_t *__p_maybe_dst_len, wchar_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_mwcntoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcnrtoc8n(size_t *__p_maybe_dst_len, ztd_char8_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_mwcntoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcnrtoc16n(size_t *__p_maybe_dst_len, ztd_char16_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_mwcntoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_mwcnrtoc32n(size_t *__p_maybe_dst_len, ztd_char32_t **__p_maybe_dst, size_t *__p_src_len, const 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_MCERROR_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_MCERROR_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_mcerror cnc_c8ntomcn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c8nrtomcn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_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_mcerror cnc_c8ntomwcn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c8nrtomwcn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror cnc_c16ntomcn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c16nrtomcn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_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_mcerror cnc_c16ntomwcn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c16nrtomwcn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror cnc_c32ntomcn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c32nrtomcn(size_t *__p_maybe_dst_len, char **__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_MCERROR_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_MCERROR_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_mcerror cnc_c32ntomwcn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror cnc_c32nrtomwcn(size_t *__p_maybe_dst_len, 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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_mcerror 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_MCERROR_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_MCERROR_OK is returned.

cnc_mcerror 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_MCERROR_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_MCERROR_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.