maxlen 0.2.0

Length-bounded string and slice/vector
Documentation
1
2
3
4
5
6
7
8
9
10
use super::Encoding;

/// The standard UTF-8 encoding used natively in Rust.
#[derive(Debug, Default, Hash)]
pub struct Utf8;
impl Encoding for Utf8 {
	fn length(s: &str) -> usize {
		s.len()
	}
}