just-string 2025.12.8

Container for various kinds of strings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{
    ops::{Deref, Index},
    slice::SliceIndex,
};

use crate::JustString;

impl<I> Index<I> for JustString<'_>
where
    I: SliceIndex<str>,
{
    type Output = <I as SliceIndex<str>>::Output;

    fn index(&self, index: I) -> &Self::Output {
        &self.deref()[index]
    }
}