class ActiveSupport::Multibyte::Chars

def grapheme_length

'क्षि'.mb_chars.grapheme_length # => 2
'क्षि'.mb_chars.length # => 4

Returns the number of grapheme clusters in the string.
def grapheme_length
  @wrapped_string.grapheme_clusters.length
end