Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astercloud/aster
/ truncate
Function
truncate
pkg/memory/quality_analyzer.go:483–488 ·
view source on GitHub ↗
truncate 截断字符串
(s string, maxLen int)
Source
from the content-addressed store, hash-verified
481
482
// truncate 截断字符串
483
func
truncate(s string, maxLen int) string {
484
if
len(s) <= maxLen {
485
return
s
486
}
487
return
s[:maxLen] +
"..."
488
}
Callers
5
TestTruncate
Function · 0.70
detectContradictions
Method · 0.70
detectDuplicates
Method · 0.70
detectOutdated
Method · 0.70
detectLowConfidence
Method · 0.70
Calls
no outgoing calls
Tested by
1
TestTruncate
Function · 0.56