pub fn split_fragment(spec: &str) -> (&str, Option<&str>)Available on crate feature
include only.Expand description
Split path#fragment into (path, Some(fragment)) /
(path, None). Used by both the resolver and the post-parse
walk so they agree on which characters are path-bytes.
ยงExamples
use noyalib::include::split_fragment;
assert_eq!(split_fragment("a.yaml#anchor"), ("a.yaml", Some("anchor")));
assert_eq!(split_fragment("a.yaml"), ("a.yaml", None));