summaryrefslogtreecommitdiffstats
path: root/runtime/doc/builtin.txt
diff options
context:
space:
mode:
authorBakudankun <bakudankun@gmail.com>2022-09-09 18:46:47 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-09 18:46:47 +0100
commit375141e1f80dced9be738568a3418f65813f4a2f (patch)
treebe23086bf0c21bbf564b42298909d856ac6780cf /runtime/doc/builtin.txt
parent0adae2da17598669e442ba38547ab18a6c1406de (diff)
patch 9.0.0430: cannot use repeat() with a blobv9.0.0430
Problem: Cannot use repeat() with a blob. Solution: Implement blob repeat. (closes #11090)
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r--runtime/doc/builtin.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 12d62a6760..01263402fa 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -471,7 +471,8 @@ remove({blob}, {idx} [, {end}]) Number/Blob
remove bytes {idx}-{end} from {blob}
remove({dict}, {key}) any remove entry {key} from {dict}
rename({from}, {to}) Number rename (move) file from {from} to {to}
-repeat({expr}, {count}) String repeat {expr} {count} times
+repeat({expr}, {count}) List/Blob/String
+ repeat {expr} {count} times
resolve({filename}) String get filename a shortcut points to
reverse({list}) List reverse {list} in-place
round({expr}) Float round off {expr}
@@ -7294,8 +7295,8 @@ repeat({expr}, {count}) *repeat()*
result. Example: >
:let separator = repeat('-', 80)
< When {count} is zero or negative the result is empty.
- When {expr} is a |List| the result is {expr} concatenated
- {count} times. Example: >
+ When {expr} is a |List| or a |Blob| the result is {expr}
+ concatenated {count} times. Example: >
:let longlist = repeat(['a', 'b'], 3)
< Results in ['a', 'b', 'a', 'b', 'a', 'b'].