Skip to main content

case_fold

Function case_fold 

Source
pub fn case_fold(c: char) -> char
Expand description

Perform case folding for the DWARF name index hashing.

This implements the case folding specified in DWARF 5 Section 6.1.1.4.5.

“The simple case folding algorithm is further described in the CaseFolding.txt file distributed with the Unicode Character Database. That file defines four classes of mappings: Common (C), Simple (S), Full (F), and Turkish (T). The hash computation specified here uses the C + S mappings only, which do not affect the total length of the string, with the addition that Turkish upper case dotted ’İ’ and lower case dotless ’ı’ are folded to the Latin lower case ’i’.”