Crates.io | i18n_parse |
lib.rs | i18n_parse |
version | 0.1.1 |
source | src |
created_at | 2024-05-21 04:00:02.341345 |
updated_at | 2024-05-21 04:00:02.341345 |
description | extract_i18n |
homepage | https://github.com/i18n-site/rust/tree/main/i18n_parse |
repository | https://github.com/i18n-site/rust.git |
max_upload_size | |
id | 1246399 |
size | 5,036 |
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
}