Get the number of occurrences of each character

后端 未结 7 1572
说谎
说谎 2020-12-09 23:05

Given the string:

a=\'dqdwqfwqfggqwq\'

How do I get the number of occurrences of each character?

7条回答
  •  忘掉有多难
    2020-12-09 23:44

    (For future reference)

    This performance comparison of various approaches might be of interest.

提交回复
热议问题