encode_to_string
pub fn encode_to_string(s string) stringPurpose
Encode to a string.
Parameters
sstring- source string (string)
Returns
string — result string
#encoding/base64Std plus Raw/URL variants.
encode_to_stringpub fn encode_to_string(s string) stringEncode to a string.
s stringstring — result string
decode_stringpub fn decode_string(s string) stringDecode from a string. Throws on failure; handle the error or propagate it to the caller.
s stringstring — result string
encode_urlpub fn encode_url(s string) stringEncode url data.
s stringstring — result string
encode_rawpub fn encode_raw(s string) stringEncode raw data.
s stringstring — result string
encode_raw_urlpub fn encode_raw_url(s string) stringEncode raw url data.
s stringstring — result string
encoded_lenpub fn encoded_len(n int, pad bool) intEncoded len.
n intpad boolint — a value of this type
decoded_lenpub fn decoded_len(n int) intDecoded len.
n intint — a value of this type
decode_urlpub fn decode_url(s string) stringDecode url data. Throws on failure; handle the error or propagate it to the caller.
s stringstring — result string
decode_raw_urlpub fn decode_raw_url(s string) stringDecode raw url data. Throws on failure; handle the error or propagate it to the caller.
s stringstring — result string
decode_rawpub fn decode_raw(s string) stringDecode raw data. Throws on failure; handle the error or propagate it to the caller.
s stringstring — result string
decode_strictpub fn decode_strict(s string) stringStrict decoders enforce zero trailing padding bits, strip CR/LF before length checks on padded encodings, and reject '=' in raw encodings. Throws on failure; handle the error or propagate it to the caller.
s stringstring — result string
decode_url_strictpub fn decode_url_strict(s string) stringDecode url strict data. Throws on failure; handle the error or propagate it to the caller.
s stringstring — result string
decode_raw_strictpub fn decode_raw_strict(s string) stringDecode raw strict data. Throws on failure; handle the error or propagate it to the caller.
s stringstring — result string
decode_raw_url_strictpub fn decode_raw_url_strict(s string) stringDecode raw url strict data. Throws on failure; handle the error or propagate it to the caller.
s stringstring — result string
valid_raw_urlpub fn valid_raw_url(s &string) boolValid raw url.
s &stringbool — true or false