pub fn executable_basename(path: &str) -> Option<String>Expand description
Extract the executable basename from a path (/ and \ are both separators).
Trailing separators are ignored. Returns None if the basename is empty.
use flexaudio_core::process_list::executable_basename;
assert_eq!(executable_basename("/usr/bin/firefox").as_deref(), Some("firefox"));
assert_eq!(executable_basename(r"C:\Program Files\App\app.exe").as_deref(), Some("app.exe"));
assert_eq!(executable_basename(""), None);