Method: CoreExt::Multibyte::Chars#compose

Defined in:
lib/core_ext/multibyte/chars.rb

#composeObject

Performs composition on all the characters.

'é'.length                       # => 3
'é'.mb_chars.compose.to_s.length # => 2


180
181
182
# File 'lib/core_ext/multibyte/chars.rb', line 180

def compose
  chars(Unicode.compose(@wrapped_string.codepoints.to_a).pack('U*'))
end