WoW:API strrep: Difference between revisions
Jump to navigation
Jump to search
(Use Lua/Libshortcut template. Change category from "LUA Functions" to "Lua functions".) |
m (Move page script moved page API strrep to API strrep without leaving a redirect) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{luaapi}} | ||
Generate a string which is n copies of the string passed concatenated together. | |||
string.rep(s, n) | string.rep(s, n) | ||
strrep(s, n) | |||
== Examples == | |||
> = string.rep("Lua ",5) | > = string.rep("Lua ",5) | ||
Lua Lua Lua Lua Lua | Lua Lua Lua Lua Lua | ||
Line 10: | Line 11: | ||
Lua | Lua | ||
Lua | Lua | ||
> = ("Fire! "):rep(3) -- naturally. | |||
Fire! Fire! Fire! |