class UNF::Normalizer

UTF-8 string normalizer class. Implementations may vary depending on the platform.

Public Class Methods

new click to toggle source
instance

Returns a normalizer instance.

# File lib/unf/normalizer.rb, line 18
    
normalize(string, form) click to toggle source

A shortcut for new.normalize(string, form).

# File lib/unf/normalizer.rb, line 25
def normalize(string, form)
  instance.normalize(string, form)
end

Public Instance Methods

normalize(string, form) click to toggle source

Normalizes a UTF-8 string into a given form (:nfc, :nfd, :nfkc or :nfkd).

# File lib/unf/normalizer.rb, line 36