config save

This commit is contained in:
euzu
2025-09-01 13:33:34 +02:00
parent a5b350c6a5
commit 5faba69108
42 changed files with 966 additions and 453 deletions
+4
View File
@@ -58,6 +58,10 @@ pub fn get_non_empty_str<'a>(first: &'a str, second: &'a str, third: &'a str) ->
}
}
pub fn is_blank_optional_string(s: &Option<String>) -> bool {
s.is_none() || s.as_ref().is_some_and(|s| s.trim().is_empty())
}
pub fn trim_slash(s: &str) -> Cow<'_, str> {
let trimmed = s.trim_matches('/');
if trimmed.len() == s.len() {