Module: TwitterCldr::Normalization

Defined in:
lib/twitter_cldr/normalization.rb

Constant Summary collapse

VALID_NORMALIZERS =
[:nfd, :nfkd, :nfc, :nfkc]
DEFAULT_NORMALIZER =
:nfd

Class Method Summary collapse

Class Method Details

.normalize(string, options = {}) ⇒ Object



16
17
18
19
# File 'lib/twitter_cldr/normalization.rb', line 16

def normalize(string, options = {})
  validate_form(form = extract_form_from(options))
  Eprun.normalize(string, form)
end

.normalized?(string, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
24
# File 'lib/twitter_cldr/normalization.rb', line 21

def normalized?(string, options = {})
  validate_form(form = extract_form_from(options))
  Eprun.normalized?(string, form)
end