string.rep

From GMod Wiki

Jump to: navigation, search
Function
Syntax string.rep( String StringToRepeat, Number Repetitions )
Where is this used?
Description:
Repeats the StringToRepeat, Repetitons number of times
Returns: String \ The resulting string.
Part of Library: String
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=String.rep]String.rep [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

Descriptionrepeats "my string, " 5 times.
Used onNewerShared.png
Code
 
local str = "my string, "
print(string.rep(str, 5))
 
Output"my string, my string, my string, my string, my string, "
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox