class UNF::Normalizer
UTF-8 string normalizer class. Implementations may vary depending on the platform.
Public Class Methods
instance()
click to toggle source
Returns a singleton normalizer instance.
# File lib/unf/normalizer.rb, line 18
new()
click to toggle source
Returns a new normalizer instance. Use singleton
instead.
# File lib/unf/normalizer.rb, line 23
normalize(string, form)
click to toggle source
A shortcut for instance.normalize(string, form).
# File lib/unf/normalizer.rb, line 24 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 35