pat.into_searcher(self).next_match().map(|(i, _)| i)
}
- /// Returns the byte index for the first character of the rightmost match of the pattern in
+ /// Returns the byte index for the first character of the last match of the pattern in
/// this string slice.
///
/// Returns [`None`] if the pattern doesn't match.
///
/// ```
/// assert_eq!("cfg".split_once('='), None);
+ /// assert_eq!("cfg=".split_once('='), Some(("cfg", "")));
/// assert_eq!("cfg=foo".split_once('='), Some(("cfg", "foo")));
/// assert_eq!("cfg=foo=bar".split_once('='), Some(("cfg", "foo=bar")));
/// ```