Skip to main content

maybe_decode_base64

Function maybe_decode_base64 

Source
pub fn maybe_decode_base64(input: &str) -> String
Expand description

Attempt to decode a base64-encoded string.

Returns the decoded UTF-8 string if the input is valid base64 that decodes to valid UTF-8. Returns the original string unchanged otherwise.