MCPcopy Create free account
hub / github.com/acking-you/static_flow / normalize_optional_string

Function normalize_optional_string

crates/backend/src/email.rs:316–320  ·  view source on GitHub ↗
(value: Option<String>)

Source from the content-addressed store, hash-verified

314}
315
316fn normalize_optional_string(value: Option<String>) -> Option<String> {
317 value
318 .map(|item| item.trim().to_string())
319 .filter(|item| !item.is_empty())
320}
321
322fn validate_frontend_url(raw: &str) -> Result<()> {
323 let parsed = Url::parse(raw).with_context(|| format!("invalid URL: {raw}"))?;

Calls 2

trimMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected