MCPcopy Create free account
hub / github.com/openclaw/gogcli / truncateString

Function truncateString

internal/cmd/comment_ops.go:496–503  ·  view source on GitHub ↗
(s string, maxLen int)

Source from the content-addressed store, hash-verified

494}
495
496func truncateString(s string, maxLen int) string {
497 s = strings.ReplaceAll(s, "\n", " ")
498 s = strings.ReplaceAll(s, "\r", "")
499 if len(s) <= maxLen {
500 return s
501 }
502 return s[:maxLen-3] + "..."
503}

Callers 4

printCompactCommentTableFunction · 0.85
writeDriveCommentDetailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected