Skip to main content
Module

x/denops_std/function/mod.ts>repeat

📚 Standard module for denops.vim
Go to Latest
function repeat
import { repeat } from "https://deno.land/x/denops_std@v3.11.1/function/mod.ts";

Repeat {expr} {count} times and return the concatenated 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: :let longlist = repeat(['a', 'b'], 3) Results in ['a', 'b', 'a', 'b', 'a', 'b']. Can also be used as a |method|: mylist->repeat(count)

Parameters

denops: Denops
expr: unknown
count: unknown

Returns

Promise<unknown>