mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
170 B
8 lines
170 B
#include <wchar.h>
|
|
|
|
int wcswidth(const wchar_t *wcs, size_t n)
|
|
{
|
|
int l=0, k=0;
|
|
for (; n-- && *wcs && (k = wcwidth(*wcs)) >= 0; l+=k, wcs++);
|
|
return (k < 0) ? k : l;
|
|
}
|
|
|