Registry / utility / mattn-go-runewidth

mattn-go-runewidth

JSON →
library0.0.24gogounverified

Provides functions to get the width of characters and strings in terminals, accounting for East Asian wide characters.

go get github.com/mattn/go-runewidth
INSTALL
IMPORT
SIG · MATTN-GO-RUNEWIDTH
M
mattn-go-runewidth
utilitygov0.0.24
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

runewidth
github.com/mattn/go-runewidth

Calculates the display width of a mixed-width string.

package main import ( "fmt" "github.com/mattn/go-runewidth" ) func main() { fmt.Println(runewidth.StringWidth("Hello, 世界")) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.24latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mattn-go-runewidth — go get mattn-go-runewidth · libregistry