embystream 0.0.15

Another Emby streaming application (frontend/backend separation) written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use md5;

pub struct StringUtil;

impl StringUtil {
    pub fn trim_trailing_slashes(input: &str) -> &str {
        input.trim_end_matches('/')
    }

    pub fn md5(input: &str) -> String {
        if input.is_empty() {
            return "".to_string();
        }
        let digest = md5::compute(input.as_bytes());
        format!("{digest:x}")
    }
}