1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-09 20:17:21 +00:00

Refactor "string truncate" (#32984)

This commit is contained in:
wxiaoguang
2024-12-26 11:56:03 +08:00
committed by GitHub
parent 594edad213
commit 9bfa9f450d
26 changed files with 199 additions and 140 deletions

View File

@ -8,7 +8,7 @@ import (
"html/template"
"strings"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/util"
)
type StringUtils struct{}
@ -54,7 +54,7 @@ func (su *StringUtils) Cut(s, sep string) []any {
}
func (su *StringUtils) EllipsisString(s string, maxLength int) string {
return base.EllipsisString(s, maxLength)
return util.EllipsisDisplayString(s, maxLength)
}
func (su *StringUtils) ToUpper(s string) string {