Refactor "string truncate" (#32984)
This commit is contained in:
parent
594edad213
commit
9bfa9f450d
26 changed files with 199 additions and 140 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue