02 Apr 2022   swift


Repeating a string is very easy to do in ruby:

puts "a" * 5
=> "aaaaa"

Swift uses a string function:

print String(repeating: "a", count: 5)
=> "aaaaa"
🍄