New trimSuffix, trimPrefix, hasSuffix, and hasPrefix functions
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.