pub fn split_into_tuple(s: &str, d: char) -> Option<(&str, &str)> {
    match s.find(d) {
        Some(p) => Some((&s[0..p], &s[p + 1..])),
        None => None,
    }
}
/// Split a string slice into a tuple of slices based on the first found location of a delimiter.
/// Returns an optional tuple of slices containing the two halves if they exist.
///
/// # Arguments
/// * 's' - The string slice to split by the delimiter
/// * 'd' - The char delimiter to split the string by
///
/// # Examples
/// ```
/// use binarytools::string_utils;
/// assert_eq!(string_utils::split_into_tuple("ABC:DEF", ':'),     Some(("ABC", "DEF")));
/// assert_eq!(string_utils::split_into_tuple("ABC", ':'),         None);
/// assert_eq!(string_utils::split_into_tuple("ABC:DEF:GHI", ':'), Some(("ABC", "DEF:GHI")));
/// assert_eq!(string_utils::split_into_tuple("ABC:", ':'),        Some(("ABC", "")));
/// assert_eq!(string_utils::split_into_tuple(":ABC", ':'),        Some(("", "ABC")));
/// ```
Split a string slice into a tuple of slices based on the first found location of a delimiter.
Returns an optional tuple of slices containing the two halves if they exist.
Split a string slice into a tuple of slices based on the first found location of a delimiter . Returns an optional tuple of slices containing the two halves if they exist .
pub fn split_into_tuple(s: &str, d: char) -> Option<(&str, &str)> {
    match s.find(d) {
        Some(p) => Some((&s[0..p], &s[p + 1..])),
        None => None,
    }
}
pub fn split_into_tuple ( s : & str , d : char ) -> Option < ( & str , & str ) > { match s . find ( d ) { Some ( p ) => Some ( ( & s [ 0 .. p ] , & s [ p + 1 .. ] ) ) , None => None , } }
Split a string slice into a tuple of slices based on the first found location of a delimiter.
Split a string slice into a tuple of slices based on the first found location of a delimiter .
s
&str
d
char
examples
None