MCPcopy Create free account
hub / github.com/AI45Lab/Code / extract_acl_field

Function extract_acl_field

core/src/llm/structured_tests.rs:1209–1218  ·  view source on GitHub ↗
(content: &str, section: &str, field: &str)

Source from the content-addressed store, hash-verified

1207}
1208
1209fn extract_acl_field(content: &str, section: &str, field: &str) -> Option<String> {
1210 let section_start = content.find(section)?;
1211 let section_content = &content[section_start..];
1212 // Find the field within the section (before next top-level block)
1213 let field_pattern = format!("{} = \"", field);
1214 let field_start = section_content.find(&field_pattern)?;
1215 let value_start = field_start + field_pattern.len();
1216 let value_end = section_content[value_start..].find('"')?;
1217 Some(section_content[value_start..value_start + value_end].to_string())
1218}
1219
1220#[tokio::test]
1221#[ignore]

Callers 1

load_minimax_configFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected