pub fn split_assign(spec: &str) -> Option<(&str, &str)>Expand description
Split a PATH=VALUE spec at the first = that is outside any [...], so a
predicate like .a[name=x].b=1 splits into (.a[name=x].b, 1).
ยงExamples
use coding_tools::patch::split_assign;
assert_eq!(
split_assign(".servers[name=web].port=8443"),
Some((".servers[name=web].port", "8443"))
);
assert_eq!(split_assign(".x=hi"), Some((".x", "hi")));
assert_eq!(split_assign(".x"), None);