Submit #2920 » test_wcsrtombs.c
1 |
#include <stdio.h>
|
---|---|
2 |
#include <string.h>
|
3 |
#include <wchar.h>
|
4 |
|
5 |
int main(int argc, char *argv[]) |
6 |
{
|
7 |
char out[64]; |
8 |
wchar_t *in = L"Hello! \x20AC Hello!"; |
9 |
const wchar_t *inptr = in; |
10 |
mbstate_t state = {0}; |
11 |
|
12 |
size_t len = wcsrtombs(out, &inptr, sizeof(out), &state); |
13 |
|
14 |
printf("inptr - in: %d \n", inptr - in); |
15 |
}
|