Skip to content

Commit 5be2c05

Browse files
committed
Merge branch 'dev'
2 parents 8d8c8a3 + acad148 commit 5be2c05

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/templates/functions.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,28 @@ Will output:
138138
true
139139
true
140140
```
141+
142+
## `width(arg)`
143+
144+
Returns the width of the input
145+
146+
```
147+
text width(111)
148+
```
149+
Will output: `3`
150+
151+
## `pad(arg, 5)`
152+
153+
Returns a string padded with spaces
154+
155+
```
156+
border
157+
text pad("hi", 4)
158+
```
159+
160+
Will output:
161+
```
162+
┌────┐
163+
│hi │
164+
└────┘
165+
```

0 commit comments

Comments
 (0)