aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates/util_string.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/templates/util_string.go')
-rw-r--r--modules/templates/util_string.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/templates/util_string.go b/modules/templates/util_string.go
index 459380aee5..18a0d5cacc 100644
--- a/modules/templates/util_string.go
+++ b/modules/templates/util_string.go
@@ -33,6 +33,11 @@ func (su *StringUtils) Join(a []string, sep string) string {
return strings.Join(a, sep)
}
+func (su *StringUtils) Cut(s, sep string) []any {
+ before, after, found := strings.Cut(s, sep)
+ return []any{before, after, found}
+}
+
func (su *StringUtils) EllipsisString(s string, max int) string {
return base.EllipsisString(s, max)
}