#radix #translation #str #numbers #static #site #convert

macro radix_str

use proc_macro convert number radix to static str

3 releases

0.1.3 Aug 17, 2024
0.1.2 Jun 13, 2024
0.1.1 Dec 1, 2023

#101 in #radix

Download history 1/week @ 2024-05-17 1/week @ 2024-05-24 103/week @ 2024-06-07 46/week @ 2024-06-14 10/week @ 2024-07-05 1/week @ 2024-07-12 132/week @ 2024-08-16 3/week @ 2024-08-23

135 downloads per month

MulanPSL-2.0

4KB

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 ⋅ 国际化解决方案 的开源组件。

Dependencies

~18KB