Method: ActiveSupport::Multibyte::Unicode#decompose

Defined in:
activesupport/lib/active_support/multibyte/unicode.rb

#decompose(type, codepoints) ⇒ Object

Decompose composed characters to the decomposed form.



12
13
14
15
16
17
18
# File 'activesupport/lib/active_support/multibyte/unicode.rb', line 12

def decompose(type, codepoints)
  if type == :compatibility
    codepoints.pack("U*").unicode_normalize(:nfkd).codepoints
  else
    codepoints.pack("U*").unicode_normalize(:nfd).codepoints
  end
end