macron-str

Crates.iomacron-str
lib.rsmacron-str
version0.1.1
created_at2025-04-06 15:10:30.889698+00
updated_at2025-05-25 04:19:22.652522+00
descriptionCreates a new instance of String
homepage
repositoryhttps://github.com/fuderis/rs-macron/tree/main/macron-str
max_upload_size
id1622986
size7,971
Bulat Sh. (fuderis)

documentation

README

githubcrates-iodocs-rs

String Macro

Introduction:

Creates a new instance of String.

P.s.: More useful macros you can find here.

Examples:

// 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!");

Licensing:

Distributed under the MIT license.

Feedback:

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.

Commit count: 15

cargo fmt