Skip to content

Commit

Permalink
Added new helpers stringsCompare and stringsContains
Browse files Browse the repository at this point in the history
  • Loading branch information
jucardi committed Jun 29, 2022
1 parent a22643d commit 9ecd273
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/helpers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func RegisterCommon(manager IHelpersManager) {
_ = manager.Register("stringsTrimLeft", strings.TrimLeft, "Returns a slice of the string s with all leading Unicode code points contained in cutset removed.")
_ = manager.Register("stringsTrimRight", strings.TrimRight, "Returns a slice of the string s, with all trailing Unicode code points contained in cutset removed.")
_ = manager.Register("stringsTrimSpace", strings.TrimSpace, "Returns a slice of the string s, with all leading and trailing white space removed, as defined by Unicode.")
_ = manager.Register("stringsContains", strings.Contains, "Returns a boolean indicating whether the string s contains substr.")
_ = manager.Register("stringsCompare", strings.Compare, "Returns an integer comparing two strings lexicographically.")
_ = manager.Register("startsWith", strings.HasPrefix, "Returns a boolean indicating whether the string s begins with prefix.")
_ = manager.Register("endsWith", strings.HasSuffix, "Returns a boolean indicating whether the string s ends with suffix.")
_ = manager.Register("br", bracketsFn, "Wraps the contents into double brackets {{ }}")
Expand Down

0 comments on commit 9ecd273

Please sign in to comment.