How to determine if all characters in a string are equal

后端 未结 6 1074
甜味超标
甜味超标 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条回答
  •  Happy的楠姐
    2021-01-13 12:22

    Get the string length, use GetMem to allocate memory the size of the string. FillChar the memory with the desired char. Then use CompareMem to compare the string and the memory

提交回复
热议问题