#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

#90 in #radix

Download history 131/week @ 2024-08-15 4/week @ 2024-08-22 12/week @ 2024-09-12 15/week @ 2024-09-19 12/week @ 2024-09-26 2/week @ 2024-10-03

181 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