MCPcopy Create free account
hub / github.com/LunaSource/Luna / TruncateString

Function TruncateString

utils/utils.go:17–22  ·  view source on GitHub ↗
(s string, maxLen int)

Source from the content-addressed store, hash-verified

15}
16
17func TruncateString(s string, maxLen int) string {
18 if len(s) <= maxLen {
19 return s
20 }
21 return s[:maxLen-3] + "..."
22}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected