times
Repeats the string n times.
This operator overload allows the use of the * operator to repeat a string.
Example:
val repeated = "abc" * 3 // Result is "abcabcabc"Content copied to clipboard
Return
A new string consisting of the original string repeated n times. Returns an empty string if n is zero or negative.
Parameters
n
The number of times to repeat the string. Must be a non-negative integer.