mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-15 14:47:51 +00:00
Add missing url_decode_str function
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
pub mod inbound_generator;
|
||||
|
||||
pub fn url_decode_str(value: &str) -> Option<String> {
|
||||
return urlencoding::decode(value)
|
||||
.ok()
|
||||
.map(|decoded| decoded.into_owned());
|
||||
}
|
||||
|
||||
pub fn url_decode(value: Option<String>) -> Option<String> {
|
||||
return value.and_then(|s| {
|
||||
urlencoding::decode(&s)
|
||||
|
||||
Reference in New Issue
Block a user