Ruby - Strings - Iteration

  • + 0 comments

    def count_multibyte_char(data) count = 0 data.each_char {|d| count +=1 if d.bytesize > 1} count

    end