Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xpl authored Jul 22, 2017
1 parent 03d4091 commit 1ce14bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A little helper for handling strings containing zero width characters, ANSI styling, whitespaces, newlines, etc.

## Determining visible string length
## Determining real (visible) string length

```javascript
const { strlen } = require ('printable-characters')
Expand Down Expand Up @@ -45,6 +45,8 @@ s.replace (ansiEscapeCodes, '') // === 'foo\nbar'

## Getting first N visible symbols, preserving the invisible parts

Use for safely truncating strings to maximum width without breaking ANSI codes:

```javascript
const { first } = require ('printable-characters')

Expand Down

0 comments on commit 1ce14bd

Please sign in to comment.