Finding # occurrences of a character in a string in Ruby

前端 未结 3 1094
情书的邮戳
情书的邮戳 2021-01-30 15:28

I\'m looking for the Ruby method (1.9...) that can help me find the number of occurrences of a character in a string. I\'m looking for all occurrences, not just the first one.

3条回答
提交回复
热议问题