htils 0.3.0

A tiny crate with few useful? macros.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Trait to simplify obtaining a symbol by index
pub trait CharAt {
    fn char_at(&self, index: usize) -> Option<char>;
}

/// CharAt implementation for String
impl CharAt for String {
    fn char_at(&self, index: usize) -> Option<char> {
        self.chars().nth(index)
    }
}

/// CharAt implementation for str
impl CharAt for str {
    fn char_at(&self, index: usize) -> Option<char> {
        self.chars().nth(index)
    }
}