MCPcopy Create free account
hub / github.com/concensure/Semantic / parse_string_array

Function parse_string_array

policy_engine/src/lib.rs:29–41  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

27}
28
29fn parse_string_array(value: &str) -> Vec<String> {
30 let v = value.trim();
31 if !(v.starts_with('[') && v.ends_with(']')) {
32 return Vec::new();
33 }
34 let inner = &v[1..v.len() - 1];
35 inner
36 .split(',')
37 .map(str::trim)
38 .filter(|s| s.len() >= 2 && s.starts_with('"') && s.ends_with('"'))
39 .map(|s| s[1..s.len() - 1].to_string())
40 .collect()
41}
42
43impl PolicyEngine {
44 pub fn from_toml(content: &str) -> Result<Self> {

Callers 1

from_tomlMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…