We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d1962b commit f27559eCopy full SHA for f27559e
cmd/docker-mcp/commands/server.go
@@ -209,11 +209,12 @@ func truncateString(s string, maxWidth int) string {
209
if maxWidth <= 0 {
210
return ""
211
}
212
- if len(s) <= maxWidth {
+ runes := []rune(s)
213
+ if len(runes) <= maxWidth {
214
return s
215
216
if maxWidth > 3 {
- return s[:maxWidth-3] + "..."
217
+ return string(runes[:maxWidth-3]) + "..."
218
- return s[:maxWidth]
219
+ return string(runes[:maxWidth])
220
0 commit comments