Skip to main content

make_id

Function make_id 

Source
pub fn make_id(parts: &[&str]) -> String
Expand description

Generate a deterministic ID from string parts.

Matches the Python _make_id implementation exactly:

def _make_id(*parts: str) -> str:
    combined = "_".join(p.strip("_.") for p in parts if p)
    cleaned = re.sub(r"[^a-zA-Z0-9]+", "_", combined)
    return cleaned.strip("_").lower()