method

nfc_one

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: UnicodeNormalize
nfc_one(string) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/unicode_normalize/normalize.rb, line 102
  def self.nfc_one(string)
    nfd_string = nfd_one string
    start = nfd_string[0]
    last_class = CLASS_TABLE[start]-1
    accents = ''
    nfd_string[1..-1].each_char do |accent|
      accent_class = CLASS_TABLE[accent]
      if last_class<accent_class and composite = COMPOSITION_TABLE[start+accent]
        start = composite
      else
        accents << accent
        last_class = accent_class
      end
    end
    hangul_comp_one(start+accents)
  end
Register or log in to add new notes.