3 stable releases

1.0.2 Jun 26, 2019

#2947 in Rust patterns

Download history 2716/week @ 2025-09-18 3318/week @ 2025-09-25 2827/week @ 2025-10-02 2551/week @ 2025-10-09 2733/week @ 2025-10-16 2415/week @ 2025-10-23 3268/week @ 2025-10-30 3255/week @ 2025-11-06 2898/week @ 2025-11-13 3219/week @ 2025-11-20 4291/week @ 2025-11-27 4858/week @ 2025-12-04 4178/week @ 2025-12-11 3992/week @ 2025-12-18 3253/week @ 2025-12-25 3422/week @ 2026-01-01

15,538 downloads per month
Used in 8 crates

MIT/Apache-2.0/CC0-1.0

4KB

Big S — Rust's missing String literal

Hey. Sometimes we need a String but all we have is a string literal (an &'static str). I mean, I think we've all seen eye-searing code filled with "this".to_string(), "that".to_owned(), or String::from("theother").

OMG somebody just do something about it.

Introducing S, the three-char solution to Rust's stupidest papercut.

Check it out:

do_something_lame("this".to_string(), "that".to_string(), "theother".to_string());

🙄

use big_s::S;

// RADICAL!
do_something_rad(S("this"), S("that"), S("theother"));

👍


Big S — Rust's missing String literal

Hey. Sometimes we need a String but all we have is a string literal (an &'static str). I mean, I think we've all seen eye-searing code filled with "this".to_string(), "that".to_owned(), or String::from("theother").

OMG somebody just do something about it.

Introducing S, the three-char solution to Rust's stupidest papercut.

Check it out:

do_something_lame("this".to_string(), "that".to_string(), "theother".to_string());

🙄

use big_s::S;

do_something_rad(S("this"), S("that"), S("theother"));

👍

License

MIT/Apache-2.0/CC0-1.0

No runtime deps