Lines Matching defs:ranges
774 /// sequence of non-overlapping non-adjacent ranges of characters.
797 /// to the ASCII ranges `A-Z` and `a-z`.
842 /// Create a new class from a sequence of ranges.
844 /// The given ranges do not need to be in any specific order, and ranges
846 pub fn new<I>(ranges: I) -> ClassUnicode
850 ClassUnicode { set: IntervalSet::new(ranges) }
853 /// Create a new class with no ranges.
863 /// Return an iterator over all ranges in this class.
865 /// The iterator yields ranges in ascending order.
870 /// Return the underlying ranges as a slice.
871 pub fn ranges(&self) -> &[ClassUnicodeRange] {
878 /// result in the class containing both the ranges `a-z` and `A-Z`.
897 /// result in the class containing both the ranges `a-z` and `A-Z`.
954 /// An iterator over all ranges in a Unicode character class.
1020 /// Additional ranges are appended to the given vector. Canonical ordering
1024 ranges: &mut Vec<ClassUnicodeRange>,
1044 ranges.push(ClassUnicodeRange::new(cp_folded, cp_folded));
1085 /// Create a new class from a sequence of ranges.
1087 /// The given ranges do not need to be in any specific order, and ranges
1089 pub fn new<I>(ranges: I) -> ClassBytes
1093 ClassBytes { set: IntervalSet::new(ranges) }
1096 /// Create a new class with no ranges.
1106 /// Return an iterator over all ranges in this class.
1108 /// The iterator yields ranges in ascending order.
1113 /// Return the underlying ranges as a slice.
1114 pub fn ranges(&self) -> &[ClassBytesRange] {
1121 /// ranges `a-z` and `A-Z`.
1171 /// An iterator over all ranges in a byte character class.
1218 /// Additional ranges are appended to the given vector. Canonical ordering
1222 ranges: &mut Vec<ClassBytesRange>,
1227 ranges.push(ClassBytesRange::new(lower - 32, upper - 32));
1232 ranges.push(ClassBytesRange::new(lower + 32, upper + 32));
1528 fn uclass(ranges: &[(char, char)]) -> ClassUnicode {
1529 let ranges: Vec<ClassUnicodeRange> = ranges
1533 ClassUnicode::new(ranges)
1536 fn bclass(ranges: &[(u8, u8)]) -> ClassBytes {
1537 let ranges: Vec<ClassBytesRange> =
1538 ranges.iter().map(|&(s, e)| ClassBytesRange::new(s, e)).collect();
1539 ClassBytes::new(ranges)