Check if string has all the letters of the alphabet

前端 未结 15 1367
终归单人心
终归单人心 2020-12-19 17:51

What would be the best logic to check all the letters in a given string.

If all the 26 letters are available in the provided string, I want to check that and perform

15条回答
  •  清歌不尽
    2020-12-19 18:07

    An array of 26 booleans is enough, each entry representing on of the alphabet letters. You can set the entry to true when the letter is found.

提交回复
热议问题