# wcwidth **Repository Path**: RT-Thread-Mirror/wcwidth ## Basic Information - **Project Name**: wcwidth - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-25 - **Last Updated**: 2022-02-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # wcwidth for RT-Thread POSIX(IEEE Std 1003.1-2001) ## NAME ``` wcwidth - determine columns needed for a wide character ``` ## SYNOPSIS ``` #define _XOPEN_SOURCE /* See feature_test_macros(7) */ #include int wcwidth(wchar_t c); ``` ## DESCRIPTION ``` The wcwidth() function returns the number of columns needed to represent the wide character c. If c is a printable wide character, the value is at least 0. If c is null wide character (L'\0'), the value is 0. Otherwise, -1 is returned. ``` ## RETURN VALUE ``` The wcwidth() function returns the number of column positions for c. ``` ## ATTRIBUTES ``` For an explanation of the terms used in this section, see attributes(7). ┌───────────────────────────────┬───────────────┬────────────────┐ │Interface │ Attribute │ Value │ ├───────────────────────────────┼───────────────┼────────────────┤ │wcwidth() │ Thread safety │ MT-Safe locale │ └───────────────────────────────┴───────────────┴────────────────┘ ``` ## CONFORMING TO ``` POSIX.1-2001, POSIX.1-2008. Note that glibc before 2.2.5 used the prototype int wcwidth(wint_t c); ``` ## Other references: - https://github.com/joejulian/xterm/blob/master/wcwidth.c - https://man7.org/linux/man-pages/man3/wcwidth.3.html ## Contact information Maintainer: [Meco Man](https://github.com/mysterywolf) Homepage: