rust-css-parser 2.3.1

Fault-tolerant CSS parser, validator, minifier and renderer: the Rust port of @tbela99/css-parser
Documentation
1
2
3
4
5
6
7
8
//! Port of `src/parser/utils/base64.ts`.

use base64::Engine;

/// base64 of the utf-8 encoding of a string
pub fn to_base64(value: &str) -> String {
    base64::engine::general_purpose::STANDARD.encode(value.as_bytes())
}