Function split_last_char

Source
pub fn split_last_char(text: &str) -> Option<(&str, char)>
Expand description

Split a string into a pair of initial part and the last character.

assert_eq!(split_last_char("abc"), Some(("ab", 'c')))