Case options to pass to various Char and String methods such as upcase or downcase.
1 Only transform ASCII characters.
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'
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 'ᾀ'
0 7 Returns true if this enum value contains ASCII
Returns true if this enum value contains Fold
Returns true if this enum value contains Turkic
Enum
Enum
Enum
Enum
Comparable(Enum)
Value
Object
Object
Object
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Unicode/CaseOptions.html