Skip to main content

group_n_chars

Function group_n_chars 

Source
pub fn group_n_chars(s: &str, n: usize) -> Vec<&str>
Expand description

Splits a string into groups of n characters. If the string length is not divisible by n, the first group will be shorter. The string must only consist of ASCII characters.