uchar.ch
Declarations
Parameters
- s - pointer to narrow character array where the multibyte character will be stored @param c8 - the UTF-8 code unit to convert @param ps - pointer to the conversion state object used when interpreting the multibyte string @return The number of bytes stored in the array object (including any shift sequences). This may be zero when c8 is not the final code unit in the UTF-8 representation of a code point. If c8 is invalid (does not contribute to a sequence of char8_t corresponding to a valid multibyte character), the value of the macro EILSEQ is stored in errno, (size_t)-1 is returned, and the conversion state is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/c8rtomb
- c8 - the UTF-8 code unit to convert @param ps - pointer to the conversion state object used when interpreting the multibyte string @return The number of bytes stored in the array object (including any shift sequences). This may be zero when c8 is not the final code unit in the UTF-8 representation of a code point. If c8 is invalid (does not contribute to a sequence of char8_t corresponding to a valid multibyte character), the value of the macro EILSEQ is stored in errno, (size_t)-1 is returned, and the conversion state is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/c8rtomb
- ps - pointer to the conversion state object used when interpreting the multibyte string @return The number of bytes stored in the array object (including any shift sequences). This may be zero when c8 is not the final code unit in the UTF-8 representation of a code point. If c8 is invalid (does not contribute to a sequence of char8_t corresponding to a valid multibyte character), the value of the macro EILSEQ is stored in errno, (size_t)-1 is returned, and the conversion state is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/c8rtomb
Returns
The number of bytes stored in the array object (including any shift sequences). This may be zero when c8 is not the final code unit in the UTF-8 representation of a code point. If c8 is invalid (does not contribute to a sequence of char8_t corresponding to a valid multibyte character), the value of the macro EILSEQ is stored in errno, (size_t)-1 is returned, and the conversion state is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/c8rtomb
See Also
- https:en.cppreference.com/w/c/string/multibyte/c8rtomb
Parameters
- pc16 - pointer to the location where the resulting 16-bit wide character will be written @param s - pointer to the multibyte character string used as input @param n - limit on the number of bytes in s that can be examined @param ps - pointer to the conversion state object used when interpreting the multibyte string @return The first of the following that applies: 0 if the character converted from s (and stored in *pc16 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char16_t from a multi-char16_t character (e.g. a surrogate pair) has now been written to *pc16. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc16. (size_t)-1 if encoding error occurs. Nothing is written to *pc16, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc16
- s - pointer to the multibyte character string used as input @param n - limit on the number of bytes in s that can be examined @param ps - pointer to the conversion state object used when interpreting the multibyte string @return The first of the following that applies: 0 if the character converted from s (and stored in *pc16 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char16_t from a multi-char16_t character (e.g. a surrogate pair) has now been written to *pc16. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc16. (size_t)-1 if encoding error occurs. Nothing is written to *pc16, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc16
- n - limit on the number of bytes in s that can be examined @param ps - pointer to the conversion state object used when interpreting the multibyte string @return The first of the following that applies: 0 if the character converted from s (and stored in *pc16 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char16_t from a multi-char16_t character (e.g. a surrogate pair) has now been written to *pc16. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc16. (size_t)-1 if encoding error occurs. Nothing is written to *pc16, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc16
- ps - pointer to the conversion state object used when interpreting the multibyte string @return The first of the following that applies: 0 if the character converted from s (and stored in *pc16 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char16_t from a multi-char16_t character (e.g. a surrogate pair) has now been written to *pc16. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc16. (size_t)-1 if encoding error occurs. Nothing is written to *pc16, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc16
Returns
The first of the following that applies: 0 if the character converted from s (and stored in *pc16 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char16_t from a multi-char16_t character (e.g. a surrogate pair) has now been written to *pc16. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc16. (size_t)-1 if encoding error occurs. Nothing is written to *pc16, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc16
See Also
- https:en.cppreference.com/w/c/string/multibyte/mbrtoc16
Parameters
- s - pointer to narrow character array where the multibyte character will be stored @param c16 - the 16-bit wide character to convert @param ps - pointer to the conversion state object used when interpreting the multibyte string @return On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the leading char16_t units in a multi-char16_t-unit sequence (occurs when processing the leading surrogate in a surrogate pair of UTF-16). On failure (if c16 is not a valid 16-bit code unit), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state. @see https:en.cppreference.com/w/c/string/multibyte/c16rtomb
- c16 - the 16-bit wide character to convert @param ps - pointer to the conversion state object used when interpreting the multibyte string @return On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the leading char16_t units in a multi-char16_t-unit sequence (occurs when processing the leading surrogate in a surrogate pair of UTF-16). On failure (if c16 is not a valid 16-bit code unit), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state. @see https:en.cppreference.com/w/c/string/multibyte/c16rtomb
- ps - pointer to the conversion state object used when interpreting the multibyte string @return On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the leading char16_t units in a multi-char16_t-unit sequence (occurs when processing the leading surrogate in a surrogate pair of UTF-16). On failure (if c16 is not a valid 16-bit code unit), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state. @see https:en.cppreference.com/w/c/string/multibyte/c16rtomb
Returns
On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the leading char16_t units in a multi-char16_t-unit sequence (occurs when processing the leading surrogate in a surrogate pair of UTF-16). On failure (if c16 is not a valid 16-bit code unit), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state. @see https:en.cppreference.com/w/c/string/multibyte/c16rtomb
See Also
- https:en.cppreference.com/w/c/string/multibyte/c16rtomb
Parameters
- pc32 - pointer to the location where the resulting 32-bit wide character will be written @param s - pointer to the multibyte character string used as input @param n - limit on the number of bytes in s that can be examined @param ps - pointer to the conversion state object used when interpreting the multibyte string @return The first of the following that applies: 0 if the character converted from s (and stored in *pc32 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char32_t from a multi-char32_t character has now been written to *pc32. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc32. (size_t)-1 if encoding error occurs. Nothing is written to *pc32, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc32
- s - pointer to the multibyte character string used as input @param n - limit on the number of bytes in s that can be examined @param ps - pointer to the conversion state object used when interpreting the multibyte string @return The first of the following that applies: 0 if the character converted from s (and stored in *pc32 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char32_t from a multi-char32_t character has now been written to *pc32. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc32. (size_t)-1 if encoding error occurs. Nothing is written to *pc32, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc32
- n - limit on the number of bytes in s that can be examined @param ps - pointer to the conversion state object used when interpreting the multibyte string @return The first of the following that applies: 0 if the character converted from s (and stored in *pc32 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char32_t from a multi-char32_t character has now been written to *pc32. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc32. (size_t)-1 if encoding error occurs. Nothing is written to *pc32, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc32
- ps - pointer to the conversion state object used when interpreting the multibyte string @return The first of the following that applies: 0 if the character converted from s (and stored in *pc32 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char32_t from a multi-char32_t character has now been written to *pc32. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc32. (size_t)-1 if encoding error occurs. Nothing is written to *pc32, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc32
Returns
The first of the following that applies: 0 if the character converted from s (and stored in *pc32 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next char32_t from a multi-char32_t character has now been written to *pc32. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc32. (size_t)-1 if encoding error occurs. Nothing is written to *pc32, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc32
See Also
- https:en.cppreference.com/w/c/string/multibyte/mbrtoc32
Parameters
- s - pointer to narrow character array where the multibyte character will be stored @param c32 - the 32-bit wide character to convert @param ps - pointer to the conversion state object used when interpreting the multibyte string @return On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the leading char32_t units in a multi-char32_t-unit sequence (does not occur in UTF-32). On failure (if c32 is not a valid 32-bit wide character), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state. @see https:en.cppreference.com/w/c/string/multibyte/c32rtomb
- c32 - the 32-bit wide character to convert @param ps - pointer to the conversion state object used when interpreting the multibyte string @return On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the leading char32_t units in a multi-char32_t-unit sequence (does not occur in UTF-32). On failure (if c32 is not a valid 32-bit wide character), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state. @see https:en.cppreference.com/w/c/string/multibyte/c32rtomb
- ps - pointer to the conversion state object used when interpreting the multibyte string @return On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the leading char32_t units in a multi-char32_t-unit sequence (does not occur in UTF-32). On failure (if c32 is not a valid 32-bit wide character), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state. @see https:en.cppreference.com/w/c/string/multibyte/c32rtomb
Returns
On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the leading char32_t units in a multi-char32_t-unit sequence (does not occur in UTF-32). On failure (if c32 is not a valid 32-bit wide character), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state. @see https:en.cppreference.com/w/c/string/multibyte/c32rtomb
See Also
- https:en.cppreference.com/w/c/string/multibyte/c32rtomb
Parameters
Returns
The first of the following that applies: 0 if the character converted from s (and stored in *pc8 if non-null) was the null character the number of bytes [1...n] of the multibyte character successfully converted from s (size_t)-3 if the next UTF-8 code unit from a character whose encoding consists of multiple code units has now been written to *pc8. No bytes are processed from the input in this case. (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pc8. (size_t)-1 if encoding error occurs. Nothing is written to *pc8, the value EILSEQ is stored in errno and the value of *ps is unspecified. @see https:en.cppreference.com/w/c/string/multibyte/mbrtoc8
See Also