Function base64_encode

Source
pub fn base64_encode(value: &str) -> String
Expand description

Encodes a binary string to a Base64-encoded ASCII string.

This function is similar to the built-in btoa function in native JavaScript, treating each character in the input string as a byte of binary data.

§Arguments

  • value - The binary string to be encoded.

§Returns

A Base64-encoded ASCII string.

§References