bracoxidize

Function bracoxidize 

Source
pub fn bracoxidize(content: &str) -> Result<Vec<String>, OxidizationError>
Expand description

Bracoxidize the provided content by tokenizing, parsing, and expanding brace patterns.

§Arguments

  • content - The input string to be processed.

§Returns

Returns a Result containing the expanded brace patterns as Vec<String>, or an OxidizationError if an error occurs during the process.

§Examples

use bracoxide::{bracoxidize, OxidizationError};

fn main() {
    let content = "foo{1..3}bar";
    match bracoxidize(content) {
        Ok(expanded) => {
            println!("Expanded patterns: {:?}", expanded);
        }
        Err(error) => {
            eprintln!("Error occurred: {:?}", error);
        }
    }
}