Skip to main content

rust_css_parser/parser/utils/
base64.rs

1//! Port of `src/parser/utils/base64.ts`.
2
3use base64::Engine;
4
5/// base64 of the utf-8 encoding of a string
6pub fn to_base64(value: &str) -> String {
7    base64::engine::general_purpose::STANDARD.encode(value.as_bytes())
8}