1 unstable release

0.1.2 Jun 13, 2024

#5 in #aok

Download history 109/week @ 2024-06-08 41/week @ 2024-06-15

150 downloads per month
Used in 2 crates (via i18n_js)

Apache-2.0

7KB
107 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
}

Dependencies

~130KB