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

Function extract_toml_string_value

atomic-agent/src/identity.rs:362–372  ·  view source on GitHub ↗

Extract a string value from a TOML `key = "value"` line.

(line: &str)

Source from the content-addressed store, hash-verified

360
361/// Extract a string value from a TOML `key = "value"` line.
362fn extract_toml_string_value(line: &str) -> Option<String> {
363 let start = line.find('"')?;
364 let rest = &line[start + 1..];
365 let end = rest.find('"')?;
366 let value = &rest[..end];
367 if value.is_empty() {
368 None
369 } else {
370 Some(value.to_string())
371 }
372}
373
374// Integration with record_turn
375

Callers 1

parse_identity_tomlFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected