GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing cplusplus.com — mbrtoc32 Reference
function
<cuchar>
mbrtoc32size_t mbrtoc32 ( char32_t * pc32, const char * pmb, size_t max, mbstate_t * ps); Convert multibyte sequence to 32-bit character
If the __STD_UTF_32__ macro is defined, the resulting character stored at pc32 follows UTF-32 encoding. The function uses (and updates) the shift state described by ps. If ps is a null pointer, the function uses its own internal shift state, which is altered as necessary only by calls to this function. If the character obtained is equivalent to the null 32-bit character, the function resets the shift state and returns zero (after storing the null 32-bit character at pc32). A call to the function with a null pointer as pmb also resets the shift state, ignoring parameters pc32 and max (no character is stored at pc32). This is the char32_t version of mbrtowc (<cwchar>). Parameters
Return ValueThe number of bytes from pmb used to produce the 32-bit character.If this was the null 32-bit character, or if pmb is a null pointer, the function returns zero (in the first case, the null 32-bit character is stored at pc32). If the multibyte sequence needs more than one char32_t to be represented (which not possible on UTF-32) and not all have yet been stored, the function returns (size_t)-3 after storing the appropriate shift character at pc32. The next call to this function with the same ps argument pointing to the same address as pmb shall produce the next character in the sequence of char32_t characters needed to represent the multibyte sequence. If the max first characters of pmb form an incomplete (but potentially valid) multibyte character, the function returns (size_t)-2 (no value is stored at pc32). Otherwise, if the characters pointed by pmb do not form a valid multibyte character (or the beginning of one), the function returns (size_t)-1 and sets errno to EILSEQ (no value is stored at pc32). Notice that size_t is an unsigned integral type, and thus none of the values possibly returned is less than zero. See also
Home page | Privacy policy
© cplusplus.com, 2000-2026 - All rights reserved - v3.3.4s Spotted an error? contact us |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |