Function json_digest::json_path::split_head_tail
source · [−]Expand description
Splits the first key from the rest of the keys in a path
use json_digest::json_path::split_head_tail;
assert_eq!(split_head_tail(".a").unwrap(), ("a", None));
assert_eq!(split_head_tail(".a.b.c").unwrap(), ("a", Some(".b.c")));