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 char buf[s ? 0 : MB_CUR_MAX];
29 const char32_t *restrict psrc = &c32;
31 size_t dstsz = MB_CUR_MAX;
32 size_t dstrem = dstsz;
34 if(l->_Codec->__c32stombs(&s, &dstrem, &psrc, &srcsz, ps)) {
35 // Successful conversion
36 return dstsz - dstrem;
46 mbstate_t *restrict ps
49 return c32rtomb_l(s, c32, ps, _PDCLIB_threadlocale());
55 #include <_PDCLIB_test.h>
59 TESTCASE( NO_TESTDRIVER );