func isIgnorable(m *Matcher, e colltab.Elem) bool { if e.Primary() > 0 { return false } if e.Secondary() > 0 { if !m.ignoreDiacritics { return false } // Primary value is 0 and ignoreDiacritics is true. In this case we // ignore the tertiary element, as it only pertains to the modifier. return true } // TODO: further distinguish once we have the new implementation. if !(m.ignoreWidth || m.ignoreCase) && e.Tertiary() > 0 { return false } // TODO: we ignore the Quaternary level for now. return true }
// TODO: remove this function once Elem is internal and Tertiary returns int. func tertiary(e colltab.Elem) int { return int(e.Tertiary()) }