projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be2e08c
)
docs: add doc for slicestr
author
bep
<bjorn.erik.pedersen@gmail.com>
Fri, 22 May 2015 20:20:35 +0000
(22:20 +0200)
committer
bep
<bjorn.erik.pedersen@gmail.com>
Fri, 22 May 2015 20:20:45 +0000
(22:20 +0200)
See #1156
docs/content/templates/functions.md
patch
|
blob
|
history
diff --git
a/docs/content/templates/functions.md
b/docs/content/templates/functions.md
index 8f095e57703e65123b1efe8dce38a7e920304ad3..59ae2dddb3bf782033f0b73a4beec4d47dc49df3 100644
(file)
--- a/
docs/content/templates/functions.md
+++ b/
docs/content/templates/functions.md
@@
-382,6
+382,16
@@
Example: Given `style = "color: red;"` defined in the front matter of your `.md`
Note: "ZgotmplZ" is a special value that indicates that unsafe content reached a
CSS or URL context.
+### slicestr
+
+Slicing in Slicestr is done by specifying a half-open range with two indices, start and end. 1 and 4 creates a slice including elements 1 through 3.
+The end index can be omitted, it defaults to the string's length.
+
+e.g.
+
+* `{{slicestr "BatMan" 3}}` → "Man"
+* `{{slicestr "BatMan" 0 3}}` → "Bat"
+
### title
Convert all characters in string to titlecase.