4 releases

0.1.5 Aug 29, 2024
0.1.4 Aug 29, 2024
0.1.3 Aug 17, 2024
0.1.2 Jun 13, 2024

#43 in #mark-down

Download history 4/week @ 2024-06-25 10/week @ 2024-07-02 3/week @ 2024-07-09 14/week @ 2024-07-16 20/week @ 2024-08-06 141/week @ 2024-08-13 19/week @ 2024-08-20 248/week @ 2024-08-27 14/week @ 2024-09-03 18/week @ 2024-09-10 8/week @ 2024-09-17 18/week @ 2024-09-24 29/week @ 2024-10-01

68 downloads per month
Used in 2 crates (via i18n_js)

MulanPSL-2.0

9KB
87 lines

extract_i18n

use aok::{Result, OK};
use static_init::constructor;

#[constructor(0)]
extern "C" fn init() {
  loginit::init()
}

#[test]
fn test() -> Result<()> {
  let s = "12345${ I18N.doc } ${12345678}12${I18N.xxx}12";
  let r = rvar::extract(s);

  let r = rvar::replace(s, &r.range[..], |key| {
    dbg!(key);
    key[5..].into()
  });
  dbg!(r);
  OK
}

About

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

关于

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

Dependencies

~135KB