[-] glynwolf@tiggi.es 1 points 5 months ago

@vk6flab Pascal was my learning language!

[-] glynwolf@tiggi.es 1 points 5 months ago

@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>();

1
submitted 3 years ago by glynwolf@tiggi.es to c/greymuzzle@pawb.social

@greymuzzle My muzzle is so grey that I only know my Pokémon from furry fan art. ;)

1
submitted 3 years ago* (last edited 3 years ago) by glynwolf@tiggi.es to c/greymuzzle@pawb.social

@greymuzzle This parody is just too real. I bet this song would have been a hit when I was a kid: https://tech.lgbt/@catdad/110810883649424081

glynwolf

0 post score
0 comment score
joined 3 years ago