MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / compact

Function compact

atomic-core/src/kg/ontology.rs:263–270  ·  view source on GitHub ↗
(iri: &str)

Source from the content-addressed store, hash-verified

261}
262
263pub fn compact(iri: &str) -> String {
264 for (prefix, namespace) in PREFIXES {
265 if let Some(local) = iri.strip_prefix(namespace) {
266 return format!("{prefix}:{local}");
267 }
268 }
269 iri.to_owned()
270}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected