How to determine if all characters in a string are equal

后端 未结 6 1094
甜味超标
甜味超标 2021-01-13 12:09

I need to know if all characters in a string are equal (formed by the same character). the function must return true or false depending if all the elements of the string ar

6条回答
  •  孤独总比滥情好
    2021-01-13 12:30

    You could implement a Select algorithm to faster find char out of place, this will not increase the speed it the string is "True", but it should make it somewhat faster.

提交回复
热议问题