pub trait SplitInfallible<'a> {
// Required methods
fn split_once_infallible(&self, delim: &str) -> (&'a str, &'a str);
fn rsplit_once_infallible(&self, delim: &str) -> (&'a str, &'a str);
}Expand description
Split a string with default behaviors on non-match.
Required Methods§
Sourcefn split_once_infallible(&self, delim: &str) -> (&'a str, &'a str)
fn split_once_infallible(&self, delim: &str) -> (&'a str, &'a str)
Split a string at the first occurrence of delim. If not found, the entire string is returned in [0], while [1] is empty.
Sourcefn rsplit_once_infallible(&self, delim: &str) -> (&'a str, &'a str)
fn rsplit_once_infallible(&self, delim: &str) -> (&'a str, &'a str)
Split a string from the last occurrence of delim. If not found, the entire string is returned in [0], while [1] is empty.