Generate A String Of Random Numbers And Letters In Rust
I'm after a string of random numbers and letters to use in Neopolgen post NeoJinja and Pre-Attentive Perception. I expect there's Rust crates that'll get what I want but I wanted to go through the exercise myself to play with some randomness in Rust. This is what I ended up with.
Code
```cargo
rand = "0.8"
```
use ;
Results
7BZ761BAEGLEH0DKR4NG
That's based on the Rust Rand Book^rrb^^ and the rand crate docs^rgr^^. I don't have a full grasp on this stuff though. As I'm reading it, using Uniform^runi^^ sounds like it's more effificent if you're doing it multiple times. I am, but I'm not worried about it for getting this to work. If I understand right, the level or randomness is the same.
If you know more about this stuff and I'm off base please hit me up on Mastodon^mast^^.
Footnotes
-
(id:rrb)
-
(id:rgr)
-
(id:runi)
-
(id:mast)