#string #macro

concat_strs

Macro for quickly building a String from components

2 stable releases

1.0.2 Jun 4, 2020

#1459 in Rust patterns

Download history 20/week @ 2023-08-12 13/week @ 2023-08-19 13/week @ 2023-08-26 20/week @ 2023-09-02 27/week @ 2023-09-09 12/week @ 2023-09-16 5/week @ 2023-09-23 15/week @ 2023-09-30 21/week @ 2023-10-07 21/week @ 2023-10-14 38/week @ 2023-10-21 45/week @ 2023-10-28 38/week @ 2023-11-04 29/week @ 2023-11-11 71/week @ 2023-11-18 27/week @ 2023-11-25

172 downloads per month

AGPL-3.0

4KB

concat_strs

docs.rs crates.io license: AGPL-3.0 github.com/9999years/concat_strs

Provides the concat_strs! macro, which allows quickly building a String from a number of components.

Example usage:

use concat_strs::concat_strs;

assert_eq!(
    "foo_bar_3.0",
    concat_strs!(
        "foo",
        '_',
        "bar",
        '_',
        3.0,
    )
);

This is the fastest way to build a string from components.

Dependencies

~1.5MB
~31K SLoC