Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
wcswidth.c File Reference
#include <wchar.h>
Include dependency graph for wcswidth.c:

Go to the source code of this file.

Functions

int wcswidth (const wchar_t *wcs, size_t n)
 

Function Documentation

◆ wcswidth()

int wcswidth ( const wchar_t *  wcs,
size_t  n 
)

Definition at line 3 of file wcswidth.c.

4 {
5  int l = 0, k = 0;
6  for(; n-- && *wcs && (k = wcwidth(*wcs)) >= 0; l += k, wcs++)
7  {
8  {
9  ;
10  }
11  }
12  return (k < 0) ? k : l;
13 }
int wcwidth(wchar_t)
Definition: wcwidth.c:11

References wcwidth().