hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 2e92f368907c51cfbb2d56c4519604543e2920f5
parent 0f6b334b6715253b030c4e783b88e911b6e53e56
Author: Colin Bate <colin@colinbate.com>
Date:   Thu,  2 Jul 2015 15:31:16 -0300

Add hasPrefix template function.

Diffstat:
Mtpl/template_funcs.go | 1+
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/tpl/template_funcs.go b/tpl/template_funcs.go
@@ -1428,6 +1428,7 @@ func init() {
 		"lower":        func(a string) string { return strings.ToLower(a) },
 		"upper":        func(a string) string { return strings.ToUpper(a) },
 		"title":        func(a string) string { return strings.Title(a) },
+		"hasPrefix":    func(a, b string) bool { return strings.HasPrefix(a, b) },
 		"partial":      Partial,
 		"ref":          Ref,
 		"relref":       RelRef,