rustauth_core/utils.rs
1//! Small shared utilities.
2
3pub mod fetch_metadata;
4pub mod host;
5pub mod ip;
6pub mod url;
7
8/// Capitalize the first Unicode scalar value in a string.
9pub fn capitalize_first_letter(value: &str) -> String {
10 let mut chars = value.chars();
11 let Some(first) = chars.next() else {
12 return String::new();
13 };
14
15 first.to_uppercase().collect::<String>() + chars.as_str()
16}