radix_str

Crates.ioradix_str
lib.rsradix_str
version0.1.3
sourcesrc
created_at2023-12-01 08:45:36.119791
updated_at2024-08-17 13:12:59.899565
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
size4,186
i18n.site (i18nsite)

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);
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Commit count: 22

cargo fmt