Function jay_lib::fns::fn_str::first_word
source · pub fn first_word<S: AsRef<str>>(s: S) -> Option<String>
Expand description
It is get first word form str. Just a mnemonic node to remember it. Example:
use jay_lib::fns::fn_str::first_word;
if let Some(subject)=first_word("abc def"){
assert_eq!("abc".to_string(),subject)
}
assert_eq!(None,first_word(""));