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

#54 in #mark-down

Download history 145/week @ 2024-06-10 5/week @ 2024-06-17 14/week @ 2024-07-01 17/week @ 2024-07-15 20/week @ 2024-08-05 125/week @ 2024-08-12 34/week @ 2024-08-19 247/week @ 2024-08-26 13/week @ 2024-09-02 8/week @ 2024-09-09 54/week @ 2024-09-16

323 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