Unicode::CaseOptions
Inherits Enum / Comparable / Value / Object
Case options to pass to various Char and String methods such as upcase or downcase.
Constants
ASCII = 1
Only transform ASCII characters.
Turkic = 2
Use Turkic case rules:
'İ'.downcase(Unicode::CaseOptions::Turkic) # => 'i'
'I'.downcase(Unicode::CaseOptions::Turkic) # => 'ı'
'i'.upcase(Unicode::CaseOptions::Turkic) # => 'İ'
'ı'.upcase(Unicode::CaseOptions::Turkic) # => 'I'
Fold = 4
Unicode case folding, which is more far-reaching than Unicode case mapping.
Note that only full mappings are defined, and calling Char#downcase with
this option will return its receiver unchanged if a multiple-character
case folding exists, even if a separate single-character transformation is
also defined in Unicode.
"ẞ".downcase(Unicode::CaseOptions::Fold) # => "ss"
'ẞ'.downcase(Unicode::CaseOptions::Fold) # => 'ẞ' # not U+00DF 'ß'
"ᾈ".downcase(Unicode::CaseOptions::Fold) # => "ἀι"
'ᾈ'.downcase(Unicode::CaseOptions::Fold) # => "ᾈ" # not U+1F80 'ᾀ'
None = 0
All = 7
Instance methods
none?
Source