repeat ()
Returns a string which contains the specified number of copies of the source string, concatenated together.
Parameters
$string
- The source string to be copied.
- Type
String
$count
- The number of times to copy the source string.
- Type
Number
Return Value
String
- A string containing the specified number of copies of the given source string.
Example
@use '@sass-fairy/string';
@debug string.repeat('.', 15);
// '...............'
@debug string.repeat('ABC', 0);
// ''
@debug string.repeat('!', 2.5em);
// '!!'