MCPcopy Create free account
hub / github.com/BlueSkyXN/AI2API / truncateString

Function truncateString

wo2api.go:1048–1053  ·  view source on GitHub ↗

截断字符串到指定长度

(s string, maxLen int)

Source from the content-addressed store, hash-verified

1046
1047// 截断字符串到指定长度
1048func truncateString(s string, maxLen int) string {
1049 if len(s) <= maxLen {
1050 return s
1051 }
1052 return s[:maxLen] + "..."
1053}
1054
1055// 从JSON字符串中递归提取所有字符串值
1056func extractAllStringValues(obj map[string]interface{}, values map[string]string, prefix string) {

Callers 1

saveResponseForAnalysisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected