Lines Matching refs:start
116 fn from_encoded_range(start: &[u8], end: &[u8]) -> Self { in from_encoded_range()
117 assert_eq!(start.len(), end.len()); in from_encoded_range()
118 match start.len() { in from_encoded_range()
120 Utf8Range::new(start[0], end[0]), in from_encoded_range()
121 Utf8Range::new(start[1], end[1]), in from_encoded_range()
124 Utf8Range::new(start[0], end[0]), in from_encoded_range()
125 Utf8Range::new(start[1], end[1]), in from_encoded_range()
126 Utf8Range::new(start[2], end[2]), in from_encoded_range()
129 Utf8Range::new(start[0], end[0]), in from_encoded_range()
130 Utf8Range::new(start[1], end[1]), in from_encoded_range()
131 Utf8Range::new(start[2], end[2]), in from_encoded_range()
132 Utf8Range::new(start[3], end[3]), in from_encoded_range()
223 pub start: u8, field
229 fn new(start: u8, end: u8) -> Self { in new()
230 Utf8Range { start, end } in new()
235 self.start <= b && b <= self.end in matches()
241 if self.start == self.end { in fmt()
242 write!(f, "[{:X}]", self.start) in fmt()
244 write!(f, "[{:X}-{:X}]", self.start, self.end) in fmt()
307 pub fn new(start: char, end: char) -> Self { in new()
309 it.push(start as u32, end as u32); in new()
318 pub fn reset(&mut self, start: char, end: char) { in reset()
320 self.push(start as u32, end as u32); in reset()
323 fn push(&mut self, start: u32, end: u32) { in push()
324 self.range_stack.push(ScalarRange { start, end }); in push()
329 start: u32, field
335 write!(f, "ScalarRange({:X}, {:X})", self.start, self.end) in fmt()
346 self.push(r2.start, r2.end); in next()
347 r.start = r1.start; in next()
356 if r.start <= max && max < r.end { in next()
367 if (r.start & !m) != (r.end & !m) { in next()
368 if (r.start & m) != 0 { in next()
369 self.push((r.start | m) + 1, r.end); in next()
370 r.end = r.start | m; in next()
380 let mut start = [0; MAX_UTF8_BYTES]; in next() localVariable
382 let n = r.encode(&mut start, &mut end); in next()
384 &start[0..n], in next()
400 if self.start < 0xE000 && self.end > 0xD7FF { in split()
402 ScalarRange { start: self.start, end: 0xD7FF }, in split()
403 ScalarRange { start: 0xE000, end: self.end }, in split()
412 self.start <= self.end in is_valid()
419 Some(Utf8Range::new(self.start as u8, self.end as u8)) in as_ascii()
436 fn encode(&self, start: &mut [u8], end: &mut [u8]) -> usize { in encode()
437 let cs = char::from_u32(self.start).unwrap(); in encode()
439 let ss = cs.encode_utf8(start); in encode()
466 fn never_accepts_surrogate_codepoints(start: char, end: char) { in never_accepts_surrogate_codepoints()
469 for r in Utf8Sequences::new(start, end) { in never_accepts_surrogate_codepoints()
475 start as u32, end as u32, r, cp, buf, in never_accepts_surrogate_codepoints()