โฌ๏ธ ้่ฆ๏ผ Repeatable
// 2022.02.15 extension String: Repeatable // ๐ ฟ๏ธ Repeatable "-" * 3 // "---"
Repeatable
is operator.
used by str.pad().
operates on Character and Int, and produces a String.
2022.02.15
// โโโโโโโโโโโโโโโโโโโโโโโโโ // โ Character * Int โ // โโโโโโโโโโโโโโโโโโโโโโโโโ /// `"-" * 3 == "---"` public func * (a: Character, n: Int) -> String { return String(repeating: a, count: n) }
Last updated 2 years ago