Lines Matching defs:get
213 /// assert_eq!(caps.get(1).unwrap().as_bytes(), &b"Citizen Kane"[..]);
214 /// assert_eq!(caps.get(2).unwrap().as_bytes(), &b"1941"[..]);
215 /// assert_eq!(caps.get(0).unwrap().as_bytes(), &b"'Citizen Kane' (1941)"[..]);
238 /// assert_eq!(caps.get(0).unwrap().as_bytes(), &b"'Citizen Kane' (1941)"[..]);
250 /// capture groups are still accessible with `get` or the `Index` notation
254 /// accessed with `get(0)` or `[0]`.
520 let m = cap.get(0).unwrap();
876 pub fn get(&self, i: usize) -> Option<(usize, usize)> {
889 /// An alias for the `get` method for backwards compatibility.
891 /// Previously, we exported `get` as `pos` in an undocumented API. To
897 self.get(i)
907 /// accessed with the `get` method.)
933 /// let text1 = caps.get(1).map_or(&b""[..], |m| m.as_bytes());
934 /// let text2 = caps.get(2).map_or(&b""[..], |m| m.as_bytes());
938 pub fn get(&self, i: usize) -> Option<Match<'t>> {
945 self.named_groups.get(name).and_then(|&i| self.get(i))
1024 if let Some(name) = slot_to_name.get(&slot) {
1040 /// of `a` and can't outlive it); to do that, use `get()` instead.
1049 self.get(i)