Skip to content

New trimSuffix, trimPrefix, hasSuffix, and hasPrefix functions

Compare
Choose a tag to compare
@technosophos technosophos released this 19 Aug 18:17
· 426 commits to master since this release

Four new functions from the strings package have been exposed as template functions. Following established conventions, we've reversed the order of parameters to better suite template usage:

{{"$5.00" | trimPrefix "$"}}

Additionally, new aliases have been added for a few functions that didn't follow the naming conventions. There is now a trimAll (used in preference to trimall) and abbrevBoth (in preference to abbrevboth).

At the 3.0 release (whenever that happens), trimall and abbrevboth will be removed.