From 3a556296b68ded68c9fcefa1c60e34d1eff40fa7 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 4 Sep 2024 21:22:03 -0400 Subject: Add Text:repeat() --- docs/text.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'docs') 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:** -- cgit v1.2.3