aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-04 21:22:03 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-04 21:22:03 -0400
commit3a556296b68ded68c9fcefa1c60e34d1eff40fa7 (patch)
tree658db57ce2c477d13cf607b1878e2ed5e2a68c92 /docs
parent00543b4e876cf069d5be22c1f06427a4c8d5bed9 (diff)
Add Text:repeat()
Diffstat (limited to 'docs')
-rw-r--r--docs/text.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/text.md b/docs/text.md
index 7039043f..3849f840 100644
--- a/docs/text.md
+++ b/docs/text.md
@@ -895,6 +895,32 @@ The text formatted as a quoted string.
---
+## `repeat`
+
+**Description:**
+Repeat some text multiple times.
+
+**Usage:**
+```tomo
+repeat(text: Text, count:Int) -> Text
+```
+
+**Parameters:**
+
+- `text`: The text to repeat.
+- `count`: The number of times to repeat it. (Negative numbers are equivalent to zero).
+
+**Returns:**
+The text repeated the given number of times.
+
+**Example:**
+```tomo
+>> "Abc":repeat(3)
+= "AbcAbcAbc"
+```
+
+---
+
## `replace`
**Description:**