天天看點

Swift-Tips之重複字元串

method:

init(repeating:count:)

let str = String(repeating: "測試", count: 10)
print(str)
//測試測試測試測試測試測試測試測試測試測試
複制代碼