You are viewing a single comment's thread. Return to all comments →
I ended up with: str.each_char.select {|ch| ch.each_byte.count > 1}.count
str.each_char.select {|ch| ch.each_byte.count > 1}.count
Seems like cookies are disabled on this browser, please enable them to open this website
Ruby - Strings - Iteration
You are viewing a single comment's thread. Return to all comments →
I ended up with:
str.each_char.select {|ch| ch.each_byte.count > 1}.count