4 mbstate_t *restrict ps);
6 This file is part of the Public Domain C Library (PDCLib).
7 Permission is granted to use, modify, and / or redistribute at will.
16 #include <_PDCLIB_encoding.h>
17 #include <_PDCLIB_locale.h>
22 mbstate_t *restrict ps,
26 const char32_t *restrict psrc = &c32;
28 size_t dstsz = MB_CUR_MAX;
29 size_t dstrem = dstsz;
31 if(l->_Codec->__c32stombs(&s, &dstrem, &psrc, &srcsz, ps)) {
32 // Successful conversion
33 return dstsz - dstrem;
43 mbstate_t *restrict ps
46 return c32rtomb_l(s, c32, ps, _PDCLIB_threadlocale());
52 #include <_PDCLIB_test.h>
56 TESTCASE( NO_TESTDRIVER );