MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / displayWidth

Function displayWidth

core/cmd/server/cmd/user.go:171–177  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

169}
170
171func displayWidth(s string) int {
172 width := 0
173 for _, r := range s {
174 width += runeDisplayWidth(r)
175 }
176 return width
177}
178
179func runeDisplayWidth(r rune) int {
180 if r == 0 {

Callers 2

printUserRowsFunction · 0.85
padDisplayWidthFunction · 0.85

Calls 1

runeDisplayWidthFunction · 0.85

Tested by

no test coverage detected