times
Returns a string containing this char sequence repeated n times.
Example:
"^" * 5 // "^^^^^"
"hi" * 0 // ""
"error" * -1 // IllegalArgumentException
Content copied to clipboard
Since
1.1.0
See also
repeat
Throws
IllegalArgumentException
when n < 0.
Returns a string containing this char repeated n times.
Example:
'a' * 5 // "aaaaa"
'a' * 0 // ""
'a' * -1 // IllegalArgumentException
Content copied to clipboard
Since
1.1.0
See also
Throws
IllegalArgumentException
when n < 0.