WoW:API strrep: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Use Lua/Libshortcut template. Change category from "LUA Functions" to "Lua functions".)
No edit summary
Line 10: Line 10:
  Lua
  Lua
  Lua
  Lua
> = ("Lua!"):rep(3)  -- naturally.
Lua!Lua!Lua!


{{LUA}}
{{LUA}}

Revision as of 18:45, 28 May 2009

Lua/Libshortcut

string.rep(s, n)

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

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

Template:LUA