[swift] Stringの文字数をカウント
Stringの文字数をカウント
Stringの文字数をカウントするにはStringのcharactersのcountを取得する
サンプルコード
let str = "test" let count = str.characters.count print(count)
Stringの文字数をカウントするにはStringのcharactersのcountを取得する
サンプルコード
let str = "test" let count = str.characters.count print(count)