@cows_are_underrated The simplest way I’ve found to do that is to convert the string into a Vec<char>. UTF-8 strings aren’t optimized for random access because of multi-byte chars.
To array of chars:
let c = s.chars().collect::<Vec<char>>();
And back to string:
let s = c.into_iter().collect::<String>();
@vk6flab Pascal was my learning language!