> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Parse Utils • Rust AI Agent SDK

> Parse Utilities

# parse\_utils

<Badge color="orange">Rust AI Agent SDK</Badge>

Parse Utilities

Utility functions for parameter parsing:

* URL detection and parsing
* Path detection
* Typo suggestion (only on error path)
* Error message generation
* String cleaning utilities

## Import

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::parity::parse_utils::*;
```

## Functions

<CardGroup cols={2}>
  <Card title="detect_url_scheme()" icon="function" href="../functions/detect_url_scheme">
    Detect URL scheme from a string. O(1) operation.
  </Card>

  <Card title="is_path_like()" icon="function" href="../functions/is_path_like">
    Check if a string looks like a file path. O(1) operation.
  </Card>

  <Card title="is_numeric_string()" icon="function" href="../functions/is_numeric_string">
    Check if a string is numeric. O(1) operation.
  </Card>

  <Card title="is_policy_string()" icon="function" href="../functions/is_policy_string">
    Check if a string is a policy specification. O(1) operation. Policy strings have format: type:action (e.g., 'policy:strict', 'pii:redact')
  </Card>

  <Card title="parse_policy_string()" icon="function" href="../functions/parse_policy_string">
    Parse a policy string into type and action. O(1) operation.
  </Card>

  <Card title="suggest_similar()" icon="function" href="../functions/suggest_similar">
    Find the most similar string from candidates using Levenshtein distance. This function is ONLY called on error paths, never on happy paths.
  </Card>

  <Card title="clean_triple_backticks()" icon="function" href="../functions/clean_triple_backticks">
    Clean triple backticks from a string (common in LLM outputs) Removes markdown code block markers like  or
  </Card>

  <Card title="clean_whitespace()" icon="function" href="../functions/clean_whitespace">
    Clean and normalize whitespace in a string
  </Card>

  <Card title="extract_json()" icon="function" href="../functions/extract_json">
    Extract JSON from a string that may contain markdown code blocks
  </Card>

  <Card title="validate_keys()" icon="function" href="../functions/validate_keys">
    Validate that all keys in a set are valid
  </Card>

  <Card title="make_preset_error()" icon="function" href="../functions/make_preset_error">
    Create a helpful error message for invalid preset
  </Card>

  <Card title="make_array_error()" icon="function" href="../functions/make_array_error">
    Create a helpful error message for invalid array format
  </Card>
</CardGroup>
