MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / budget_line_value

Function budget_line_value

src/sessions/codex.rs:682–692  ·  view source on GitHub ↗
(text: &'a str, prefix: &str)

Source from the content-addressed store, hash-verified

680}
681
682fn budget_line_value<'a>(text: &'a str, prefix: &str) -> Option<&'a str> {
683 text.lines()
684 .map(str::trim)
685 .find_map(|line| line.strip_prefix("- ")?.trim().strip_prefix(prefix))
686 .or_else(|| {
687 text.lines()
688 .map(str::trim)
689 .find_map(|line| line.strip_prefix(prefix))
690 })
691 .map(str::trim)
692}
693
694fn parse_budget_count(value: &str) -> Option<i64> {
695 let digits = value

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected