1 个不稳定版本

0.1.1 2024年5月21日

#44#ok

Apache-2.0

9KB
104

extract_i18n

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

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

#[test]
fn test() -> Result<()> {
  let s = "xxxx${ I18N.doc }xx${I18N.xxx}x";
  let r = i18n_parse::extract(s);
  let to = ["Document", "Example"];

  let r = i18n_parse::replace(s, &r.range[..], &to);
  dbg!(r);
  OK
}

依赖项

~130KB