โ๏ธCharacter * Int
โฌ๏ธ ้่ฆ๏ผ Repeatable
// 2022.02.15
extension String: Repeatable    // ๐
ฟ๏ธ Repeatable
"-" * 3                         // "---"History
- 2022.02.15 
// โโโโโโโโโโโโโโโโโโโโโโโโโ
// โ    Character * Int    โ
// โโโโโโโโโโโโโโโโโโโโโโโโโ
/// `"-" * 3 == "---"`
public func * (a: Character, n: Int) -> String {
    return String(repeating: a, count: n)
}Last updated
Was this helpful?