Registry / utility / mattn-go-runewidth-v0

mattn-go-runewidth-v0

JSON →
library0.0.4gogounverified

Go Runewidth provides functions to get the width of characters and strings in terminals, handling East Asian wide characters.

go get gopkg.in/mattn/go-runewidth.v0
INSTALL
IMPORT
SIG · MATTN-GO-RUNEWIDTH
M
mattn-go-runewidth-v0
utilitygov0.0.4
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
gopkg.in/mattn/go-runewidth.v0

Calculate the display width of a mixed-width string

package main import ( "fmt" "gopkg.in/mattn/go-runewidth.v0" ) func main() { w := runewidth.StringWidth("Hello, 世界") fmt.Println(w) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

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