MCPcopy Create free account
hub / github.com/davidblewett/rure-python / split

Method split

regex/src/re_unicode.rs:370–375  ·  view source on GitHub ↗

Returns an iterator of substrings of `text` delimited by a match of the regular expression. Namely, each element of the iterator corresponds to text that *isn't* matched by the regular expression. This method will *not* copy the text given. # Example To split a string delimited by arbitrary amounts of spaces or tabs: ```rust # extern crate regex; use regex::Regex; # fn main() { let re = Regex:

(&'r self, text: &'t str)

Source from the content-addressed store, hash-verified

368 /// # }
369 /// ```
370 pub fn split<'r, 't>(&'r self, text: &'t str) -> Split<'r, 't> {
371 Split {
372 finder: self.find_iter(text),
373 last: 0,
374 }
375 }
376
377 /// Returns an iterator of at most `limit` substrings of `text` delimited
378 /// by a match of the regular expression. (A `limit` of `0` will return no

Callers 1

splitnMethod · 0.45

Calls 1

find_iterMethod · 0.45

Tested by

no test coverage detected