tpl: Add strings.Repeat

This commit is contained in:
David E. Wheeler
2018-06-03 02:55:37 -04:00
committed by Bjørn Erik Pedersen
parent 07b96d16e8
commit 13435a6f60
5 changed files with 109 additions and 0 deletions

View File

@@ -3410,6 +3410,20 @@
]
]
},
"Repeat": {
"Description": "Repeat returns a new string consisting of count copies of the string s.",
"Args": [
"s",
"n"
],
"Aliases": null,
"Examples": [
[
"{{ \"yo\" | strings.Repeat 4 }}",
"yoyoyoyo"
]
]
},
"Truncate": {
"Description": "Truncate truncates a given string to the specified length.",
"Args": [