WoW:API strrep

Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API strrep to API strrep without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

WoW Lua

Generate a string which is n copies of the string passed concatenated together.

string.rep(s, n)
strrep(s, n)

ExamplesEdit

> = string.rep("Lua ",5)
Lua Lua Lua Lua Lua
> = string.rep("Lua\n",3)
Lua
Lua
Lua
> = ("Fire! "):rep(3)  -- naturally.
Fire! Fire! Fire!