openauth-core 0.0.4

Core types and primitives for OpenAuth.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Small shared utilities.

pub mod fetch_metadata;
pub mod host;
pub mod ip;
pub mod url;

/// Capitalize the first Unicode scalar value in a string.
pub fn capitalize_first_letter(value: &str) -> String {
    let mut chars = value.chars();
    let Some(first) = chars.next() else {
        return String::new();
    };

    first.to_uppercase().collect::<String>() + chars.as_str()
}