pub fn get_pre_paths(scope_level: i16, own_paths: &str) -> Option<String>Expand description
Get the previous path at the specified level from the own paths.
ยงExamples
use bios_basic::rbum::helper::rbum_scope_helper::get_pre_paths;
assert_eq!(get_pre_paths(0, "a/b/c"), Some("".to_string()));
assert_eq!(get_pre_paths(0, "a/b/c/"), Some("".to_string()));
assert_eq!(get_pre_paths(1, "a/b/c"), Some("a".to_string()));
assert_eq!(get_pre_paths(2, "a/b/c"), Some("a/b".to_string()));
assert_eq!(get_pre_paths(3, "a/b/c"), Some("a/b/c".to_string()));
assert_eq!(get_pre_paths(4, "a/b/c"), None);