Extract a string value from a TOML `key = "value"` line.
(line: &str)
| 543 | |
| 544 | /// Extract a string value from a TOML `key = "value"` line. |
| 545 | fn 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 |
no test coverage detected