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"
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"