1 // Uses various wchar_t * functions that have hand written SSE assembly
2 // implementations in glibc. wcslen, wcscpy, wcscmp, wcsrchr, wcschr.
8 int main(int argc
, char **argv
)
10 wchar_t a
[] = L
"The spazzy orange tiger jumped over the tawny jaguar.";
14 size_t l
= wcslen (a
);
15 fprintf (stderr
, "wcslen: %zd\n", l
); // wcslen: 53
17 b
= (wchar_t *) malloc((l
+ 1) * sizeof (wchar_t));
20 fprintf (stderr
, "wcscmp equal: %d\n", wcscmp (a
, b
)); // wcscmp equal: 0
22 d
= wcsrchr (a
, L
'd');
25 fprintf (stderr
, "wcsrchr == wcschr: %d\n", d
== e
); // wcsrchr == wcschr: 1