instance method
decompose
Ruby on Rails 3.2.22.5
Since v2.2.3Signature
decompose()
Performs canonical decomposition on all the characters.
Example:
'é'.length # => 2 'é'.mb_chars.decompose.to_s.length # => 3
Source
# File activesupport/lib/active_support/multibyte/chars.rb, line 388
def decompose
chars(Unicode.decompose_codepoints(:canonical, Unicode.u_unpack(@wrapped_string)).pack('U*'))
end
Defined in activesupport/lib/active_support/multibyte/chars.rb line 388
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Chars