this post was submitted on 15 Mar 2026
62 points (97.0% liked)
Rust
7855 readers
86 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This is simply not possible in rust, because strings are utf-8, so the size of a single character can vary. I think there might be a class for ASCII strings, but otherwise you can just use Vev and then convert to string