summaryrefslogtreecommitdiffstats
path: root/tpl/strings
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-30 18:12:08 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-06 19:43:22 +0200
commit6eea32bd6bc8e7a7dd07a8cb6a8343ae2c74aba0 (patch)
treedc9b14069f5e983942ac53c6f5e6d8629a5c269e /tpl/strings
parenta6d545854a670356e93cd48e55de6e81233d68cb (diff)
tpl: Improve godoc
Diffstat (limited to 'tpl/strings')
-rw-r--r--tpl/strings/strings.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tpl/strings/strings.go b/tpl/strings/strings.go
index af7c34a59..000490f85 100644
--- a/tpl/strings/strings.go
+++ b/tpl/strings/strings.go
@@ -372,7 +372,7 @@ func (ns *Namespace) Title(s any) (string, error) {
return ns.titleFunc(ss), nil
}
-// FirstUpper returns a string with the first character as upper case.
+// FirstUpper converts s making the first character upper case.
func (ns *Namespace) FirstUpper(s any) (string, error) {
ss, err := cast.ToStringE(s)
if err != nil {
@@ -404,8 +404,8 @@ func (ns *Namespace) ToUpper(s any) (string, error) {
return strings.ToUpper(ss), nil
}
-// Trim returns a string with all leading and trailing characters defined
-// contained in cutset removed.
+// Trim returns converts the strings s removing all leading and trailing characters defined
+// contained.
func (ns *Namespace) Trim(s, cutset any) (string, error) {
ss, err := cast.ToStringE(s)
if err != nil {
@@ -484,7 +484,7 @@ func (ns *Namespace) TrimSuffix(suffix, s any) (string, error) {
return strings.TrimSuffix(ss, sx), nil
}
-// Repeat returns a new string consisting of count copies of the string s.
+// Repeat returns a new string consisting of n copies of the string s.
func (ns *Namespace) Repeat(n, s any) (string, error) {
ss, err := cast.ToStringE(s)
if err != nil {