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

Function extract_toml_string_value

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

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

(line: &str)

Source from the content-addressed store, hash-verified

543
544/// Extract a string value from a TOML `key = "value"` line.
545fn extract_toml_string_value(line: &str) -> Option<String> {
546 let start = line.find('"')?;
547 let rest = &line[start + 1..];
548 let end = rest.find('"')?;
549 let value = &rest[..end];
550 if value.is_empty() {
551 None
552 } else {
553 Some(value.to_string())
554 }
555}
556
557// Integration with record_turn
558

Callers 1

parse_identity_tomlFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected