@became_fish@migratory if you don't want to allocate extra memory but still wants to iterate char-by-char, you can also use the .chars() method and consume one element at a time.
The returned value is a rust iterator that yields a char every time you call .next() on it. It doesn't allocate anything on the heap because it's actually just a pointer to the string + a counter