Skip to main content

prefix_seed

Function prefix_seed 

Source
pub fn prefix_seed(lexical: &str, seed_chars: usize) -> Option<&str>
Expand description

First seed_chars characters of lexical, or None when it is empty.

Truncation is by char, never by byte: a byte slice could split a UTF-8 sequence and produce a term that neither indexes nor compares correctly.