| Crates.io | stringvec |
| lib.rs | stringvec |
| version | 0.1.0 |
| created_at | 2024-08-27 01:15:10.919831+00 |
| updated_at | 2024-08-27 01:15:10.919831+00 |
| description | A simple macro for creating Vec |
| homepage | |
| repository | https://github.com/bednie/stringvec |
| max_upload_size | |
| id | 1352742 |
| size | 43,535 |
A simple Rust macro for creating Vec<String> from various types.
Add this to your Cargo.toml:
[dependencies]
stringvec = "0.1.0"
Then, in your Rust code:
use stringvec::stringvec;
fn main() {
let words = stringvec!["cat", 11, 'A', 3.5];
println!("{:?}", words);
// Output: ["cat", "11", "A", "3.5"]
}
Vec<String> from various typesString using to_string()is_string() to check if a value is a StringThis project is licensed under the GNU Lesser General Public License v3.0 or later - see the LICENSE file for details.