nanos world API Reference Unofficial documentation
Function Shared Native

string.rep

Returns a string that is the concatenation of <code>n</code> copies of the string <code>s</code> separated by the string <code>sep</code>.

Syntax

Lua
string.rep(str, repetitions, separator)

Parameters

Name Type Default Description
str string The string to convert.
repetitions number Timer to repeat, this values gets rounded internally.
separator string String that will separate the repeated piece. Notice that it doesn't add this string to the start or the end of the result, only between the repeated parts.

Returns

  • string