MCPcopy Create free account
hub / github.com/MengMengCode/GetRealityDomain / truncateString

Function truncateString

output.go:345–350  ·  view source on GitHub ↗

truncateString 截断字符串到指定长度

(s string, maxLen int)

Source from the content-addressed store, hash-verified

343
344// truncateString 截断字符串到指定长度
345func truncateString(s string, maxLen int) string {
346 if len(s) <= maxLen {
347 return s
348 }
349 return s[:maxLen-3] + "..."
350}
351
352// ExportRealityConfig 导出Reality配置文件
353func ExportRealityConfig(filename string, configFile string) error {

Callers 1

PrintRealityTargetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected