Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
171
func
displayWidth(s string) int {
172
width := 0
173
for
_, r :=
range
s {
174
width += runeDisplayWidth(r)
175
}
176
return
width
177
}
178
179
func
runeDisplayWidth(r rune) int {
180
if
r == 0 {
Callers
2
printUserRows
Function · 0.85
padDisplayWidth
Function · 0.85
Calls
1
runeDisplayWidth
Function · 0.85
Tested by
no test coverage detected