vi 0.8.0

An input method library for vietnamese IME
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use vi::{transform_buffer, VNI};

fn main() {
    let inputs = "xin chao2 toi6 la2 Hung7, toi6 den961 tu72 Viet65 Nam";

    let words = inputs.split(' ');

    let mut result = String::new();
    for word in words {
        transform_buffer(&VNI, word.chars(), &mut result);
        result.push(' ');
    }

    println!("{}", result); // prints "xin chào tôi là Hưng, tôi đến từ Việt Nam"
}