Skip to content

Commit 95dab4c

Browse files
authored
Merge pull request #31 from togglebyte/dev
truncate docs
2 parents 802ccc3 + c522875 commit 95dab4c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/templates/functions.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ free function: `to_upper("string")`
77

88
Do note that calling a function as a member function on a collection
99

10+
## `truncate(string, number)`
11+
12+
Truncate a string if it's longer than `number`.
13+
14+
### Example
15+
16+
```
17+
text "hello world".truncate(5)
18+
```
19+
20+
Will output: "hello".
21+
1022
## `to_upper(string)`
1123

1224
Convert a string to upper case.

0 commit comments

Comments
 (0)