Returns an iterator of at most `limit` substrings of `text` delimited by a match of the regular expression. (A `limit` of `0` will return no substrings.) Namely, each element of the iterator corresponds to text that *isn't* matched by the regular expression. The remainder of the string that is not split will be the last element in the iterator. This method will *not* copy the text given. # Examp
(&'r self, text: &'t str, limit: usize)
| 395 | /// # } |
| 396 | /// ``` |
| 397 | pub fn splitn<'r, 't>(&'r self, text: &'t str, limit: usize) |
| 398 | -> SplitN<'r, 't> { |
| 399 | SplitN { |
| 400 | splits: self.split(text), |
| 401 | n: limit, |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | /// Replaces the leftmost-first match with the replacement provided. |
| 406 | /// The replacement can be a regular string (where `$N` and `$name` are |