i18n_parse

Crates.ioi18n_parse
lib.rsi18n_parse
version0.1.1
sourcesrc
created_at2024-05-21 04:00:02.341345
updated_at2024-05-21 04:00:02.341345
descriptionextract_i18n
homepagehttps://github.com/i18n-site/rust/tree/main/i18n_parse
repositoryhttps://github.com/i18n-site/rust.git
max_upload_size
id1246399
size5,036
(3tieto)

documentation

README

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
}
Commit count: 3

cargo fmt