disarm 0.10.0

Unicode canonicalization and TR39 confusable analysis: building blocks for text-security pipelines (homoglyph/bidi/zalgo handling) plus standards-based transliteration
Documentation
1
2
3
4
5
6
7
8
9
10
//! PyO3 shim for `crate::whitespace` (Layer-1). Infallible.

use pyo3::prelude::*;

/// `collapse_whitespace(text, *, strip_control=True, strip_zero_width=True) -> str`
#[pyfunction]
#[pyo3(signature = (text, *, strip_control = true, strip_zero_width = true))]
pub fn _collapse_whitespace(text: &str, strip_control: bool, strip_zero_width: bool) -> String {
    crate::whitespace::collapse_whitespace(text, strip_control, strip_zero_width)
}