Lines Matching defs:get
269 /// assert_eq!(caps.get(1).unwrap().as_str(), "Citizen Kane");
270 /// assert_eq!(caps.get(2).unwrap().as_str(), "1941");
271 /// assert_eq!(caps.get(0).unwrap().as_str(), "'Citizen Kane' (1941)");
294 /// assert_eq!(caps.get(0).unwrap().as_str(), "'Citizen Kane' (1941)");
306 /// capture groups are still accessible with `get` or the `Index` notation
310 /// accessed with `get(0)` or `[0]`.
578 let m = cap.get(0).unwrap();
886 pub fn get(&self, i: usize) -> Option<(usize, usize)> {
899 /// An alias for the `get` method for backwards compatibility.
901 /// Previously, we exported `get` as `pos` in an undocumented API. To
907 self.get(i)
917 /// accessed with the `get` method.)
943 /// let text1 = caps.get(1).map_or("", |m| m.as_str());
944 /// let text2 = caps.get(2).map_or("", |m| m.as_str());
948 pub fn get(&self, i: usize) -> Option<Match<'t>> {
955 self.named_groups.get(name).and_then(|&i| self.get(i))
1019 if let Some(name) = slot_to_name.get(&slot) {
1035 /// of `a` and can't outlive it); to do that, use `get()` instead.
1044 self.get(i)
1169 /// `dst.push_str(caps.get(0).unwrap().as_str())`.