• Home
  • Raw
  • Download

Lines Matching refs:IsNormalized

10 pub enum IsNormalized {  enum
21 fn quick_check<F, I>(s: I, is_allowed: F, stream_safe: bool) -> IsNormalized in quick_check()
24 F: Fn(char) -> IsNormalized, in quick_check() argument
28 let mut result = IsNormalized::Yes; in quick_check()
40 return IsNormalized::No; in quick_check()
43 IsNormalized::Yes => (), in quick_check()
44 IsNormalized::No => return IsNormalized::No, in quick_check()
45 IsNormalized::Maybe => { in quick_check()
46 result = IsNormalized::Maybe; in quick_check()
55 return IsNormalized::No; in quick_check()
72 pub fn is_nfc_quick<I: Iterator<Item = char>>(s: I) -> IsNormalized { in is_nfc_quick()
78 pub fn is_nfkc_quick<I: Iterator<Item = char>>(s: I) -> IsNormalized { in is_nfkc_quick()
84 pub fn is_nfd_quick<I: Iterator<Item = char>>(s: I) -> IsNormalized { in is_nfd_quick()
90 pub fn is_nfkd_quick<I: Iterator<Item = char>>(s: I) -> IsNormalized { in is_nfkd_quick()
96 pub fn is_nfc_stream_safe_quick<I: Iterator<Item = char>>(s: I) -> IsNormalized { in is_nfc_stream_safe_quick()
102 pub fn is_nfd_stream_safe_quick<I: Iterator<Item = char>>(s: I) -> IsNormalized { in is_nfd_stream_safe_quick()
110 IsNormalized::Yes => true, in is_nfc()
111 IsNormalized::No => false, in is_nfc()
112 IsNormalized::Maybe => s.chars().eq(s.chars().nfc()), in is_nfc()
120 IsNormalized::Yes => true, in is_nfkc()
121 IsNormalized::No => false, in is_nfkc()
122 IsNormalized::Maybe => s.chars().eq(s.chars().nfkc()), in is_nfkc()
130 IsNormalized::Yes => true, in is_nfd()
131 IsNormalized::No => false, in is_nfd()
132 IsNormalized::Maybe => s.chars().eq(s.chars().nfd()), in is_nfd()
140 IsNormalized::Yes => true, in is_nfkd()
141 IsNormalized::No => false, in is_nfkd()
142 IsNormalized::Maybe => s.chars().eq(s.chars().nfkd()), in is_nfkd()
150 IsNormalized::Yes => true, in is_nfc_stream_safe()
151 IsNormalized::No => false, in is_nfc_stream_safe()
152 IsNormalized::Maybe => s.chars().eq(s.chars().stream_safe().nfc()), in is_nfc_stream_safe()
160 IsNormalized::Yes => true, in is_nfd_stream_safe()
161 IsNormalized::No => false, in is_nfd_stream_safe()
162 IsNormalized::Maybe => s.chars().eq(s.chars().stream_safe().nfd()), in is_nfd_stream_safe()
168 use super::{is_nfc_stream_safe_quick, is_nfd_stream_safe_quick, IsNormalized};
173 assert_eq!(is_nfd_stream_safe_quick(okay.chars()), IsNormalized::Yes); in test_stream_safe_nfd()
176 assert_eq!(is_nfd_stream_safe_quick(too_much.chars()), IsNormalized::No); in test_stream_safe_nfd()
182 assert_eq!(is_nfc_stream_safe_quick(okay.chars()), IsNormalized::Maybe); in test_stream_safe_nfc()
185 assert_eq!(is_nfc_stream_safe_quick(too_much.chars()), IsNormalized::No); in test_stream_safe_nfc()