https://github.com/fssay/random-string
Allows to generate random strings based on a given charset and length.
https://github.com/fssay/random-string
crate random random-string rust-lang string
Last synced: 4 months ago
JSON representation
Allows to generate random strings based on a given charset and length.
- Host: GitHub
- URL: https://github.com/fssay/random-string
- Owner: FssAy
- Created: 2020-10-10T10:05:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-10T20:50:42.000Z (about 2 years ago)
- Last Synced: 2025-06-02T04:26:59.591Z (10 months ago)
- Topics: crate, random, random-string, rust-lang, string
- Language: Rust
- Homepage: https://crates.io/crates/random-string
- Size: 20.5 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# random-string
A simple crate that allows you to generate random strings based on a given charset and length.
## Usage
Add a dependence in `Cargo.toml`
```toml
[dependencies]
random-string = "1.0"
```
## Example
```rust
use random_string::generate;
fn main() {
let charset = "1234567890";
println!("[{}]", generate(6, charset));
}
```