Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/string-width-cli
Get the visual width of a string - the number of columns required to display it
https://github.com/sindresorhus/string-width-cli
Last synced: about 2 months ago
JSON representation
Get the visual width of a string - the number of columns required to display it
- Host: GitHub
- URL: https://github.com/sindresorhus/string-width-cli
- Owner: sindresorhus
- License: mit
- Created: 2015-07-20T01:25:21.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2023-10-28T17:13:50.000Z (8 months ago)
- Last Synced: 2024-04-13T17:43:01.453Z (2 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 13
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Lists
- awesome-cli - string-width-cli - Get the visual width of a string - the number of columns required to display it (Other / OS X)
README
# string-width-cli
> Get the visual width of a string - the number of columns required to display it
Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width.
Useful to be able to measure the actual width of command-line output.
## Install
```sh
npm install --global string-width-cli
```## Usage
```
string-width --helpUsage
$ string-widthExample
$ string-width a古
3
```## Related
- [string-width](https://github.com/sindresorhus/string-width) - API for this module