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

#38 in #mark-down


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