| Crates.io | macron-str |
| lib.rs | macron-str |
| version | 0.1.1 |
| created_at | 2025-04-06 15:10:30.889698+00 |
| updated_at | 2025-05-25 04:19:22.652522+00 |
| description | Creates a new instance of String |
| homepage | |
| repository | https://github.com/fuderis/rs-macron/tree/main/macron-str |
| max_upload_size | |
| id | 1622986 |
| size | 7,971 |
Creates a new instance of String.
P.s.: More useful macros you can find here.
// simple string:
let s = str!("Hello, World!");
assert_eq!(s, "Hello, World!");
// from integer:
let s = str!(10);
assert_eq!(s, "10");
// from refference:
let r = 10.2;
let s = str!(r);
assert_eq!(s, "10.2");
// string formatting with arguments:
let s = str!("Hello, {}!", "World");
assert_eq!(s, "Hello, World!");
// string formatting with named arguments:
let name = "World";
let s = str!("Hello, {name}!");
assert_eq!(s, "Hello, World!");
Distributed under the MIT license.
You can contact me via GitHub or send a message to my Telegram @fuderis.
This library is constantly evolving, and I welcome your suggestions and feedback.