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

Function UrlTitle

pkg/htmltext/htmltext.go:67–77  ·  view source on GitHub ↗
(title string)

Source from the content-addressed store, hash-verified

65}
66
67func UrlTitle(title string) (text string) {
68 title = convertChinese(title)
69 title = clearEmoji(title)
70 title = slugify.Slugify(title)
71 title = url.QueryEscape(title)
72 title = cutLongTitle(title)
73 if len(title) == 0 {
74 title = "topic"
75 }
76 return title
77}
78
79func clearEmoji(s string) string {
80 var ret strings.Builder

Callers 15

QuestionURLFunction · 0.92
QuestionInfoRedirectMethod · 0.92
QuestionInfoMethod · 0.92
FormatQuestionsPageMethod · 0.92
ShowFormatMethod · 0.92
SearchUserTopListMethod · 0.92
GetQuestionsByTitleMethod · 0.92
ListUserVotesMethod · 0.92
GetUnreviewedPostPageMethod · 0.92

Calls 3

convertChineseFunction · 0.85
clearEmojiFunction · 0.85
cutLongTitleFunction · 0.85

Tested by 1

TestUrlTitleFunction · 0.68