Swift2.0にしたら出たエラー。
Swift2.0で文字列の長さを出すには、書き方が変わってるよ。
出たエラー
count is unavailable: access the count property on the collection. Type String doesn’t conform to protocol CollectionType
Swift1.2まで
|
1 |
count(str) |
Swift2.0から
|
1 |
str.characters.count |
これでおk
