mirror of
https://github.com/euzu/tuliprox.git
synced 2026-09-30 21:12:12 +02:00
config save
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user