radix_str

Crates.ioradix_str
lib.rsradix_str
version0.1.2
sourcesrc
created_at2023-12-01 08:45:36.119791
updated_at2024-06-13 10:37:51.930841
descriptionuse proc_macro convert number radix to static str
homepagehttps://github.com/i18n-site/rust/tree/main/radix_str
repositoryhttps://github.com/i18n-site/rust.git
max_upload_size
id1054871
size2,974
(3tieto)

documentation

README

radix_str : use proc_macro convert number radix to static str

use radix_str::radix_str;

static TEST0: &str = radix_str!(1234567890, 36);
static TEST1: &str = radix_str!(-1234567890, 36);

#[test]
fn test() {
  assert_eq!(TEST0, "kf12oi");
  assert_eq!(TEST1, "-kf12oi");
  println!("TEST0 = {}", TEST0);
  println!("TEST1 = {}", TEST1);
}
Commit count: 3

cargo fmt