WoW:API strrep

Revision as of 22:42, 25 March 2010 by WoWWiki>Starlightblunder ({{luaapi}})

WoW Lua

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

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

Examples

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