MCPcopy Index your code
hub / github.com/apache/answer / convertChinese

Function convertChinese

pkg/htmltext/htmltext.go:90–96  ·  view source on GitHub ↗
(content string)

Source from the content-addressed store, hash-verified

88}
89
90func convertChinese(content string) string {
91 has := checker.IsChinese(content)
92 if !has {
93 return content
94 }
95 return strings.Join(pinyin.LazyConvert(content, nil), "-")
96}
97
98func cutLongTitle(title string) string {
99 maxBytes := 150

Callers 1

UrlTitleFunction · 0.85

Calls 1

IsChineseFunction · 0.92

Tested by

no test coverage detected