Skip to content

Comments

Handle zero-width spaces correctly#20

Closed
r0wanda wants to merge 2 commits intosindresorhus:mainfrom
r0wanda:main
Closed

Handle zero-width spaces correctly#20
r0wanda wants to merge 2 commits intosindresorhus:mainfrom
r0wanda:main

Conversation

@r0wanda
Copy link

@r0wanda r0wanda commented Jun 22, 2024

Zero width spaces are currently counted as 1 character, despite not being displayed as 1, even in monospace fonts.

@sindresorhus
Copy link
Owner

The existing logic is correct. This package counts characters. I think you want my https://github.com/sindresorhus/string-width package instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants