What is Nostr?
mcc /
npub15vt…x8ma
2024-11-13 13:22:16

mcc on Nostr: Okay so yes I get it random indexing into a UTF-8 string is a difficult problem but ...

Okay so yes I get it random indexing into a UTF-8 string is a difficult problem but since Rust already has a byte array guaranteed to have valid UTF-8, then it ought to be possible to define an *index* which is guaranteed to refer to the start of a valid UTF-8 character and which therefore could be used for random indexing into some_string.chars()
Author Public Key
npub15vtzh9eq7663ttzt6gk4af9t7ru97459zvxu5s85dlngfl59kf2srvx8ma