AutoCorrrect for Rust
Automatically add whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).
Other implements
- Ruby - auto-correct.
- Go - go-auto-correct.
- Rust - auto-correct.rs.
Features
- Auto add spacings between CJK (Chinese, Japanese, Korean) and English words.
- HTML content support.
Install
In your Cargo.toml
[]
= "0.2.0"
Usage
Use autocorrect::format
to format plain text.
extern crate autocorrect;
Benchmark
Format
Use cargo bench
to run benchmark tests.
test tests::bench_format_100 ... bench: 19,410 ns/iter (+/- 1,571)
test tests::bench_format_400 ... bench: 45,957 ns/iter (+/- 3,444)
test tests::bench_format_50 ... bench: 14,538 ns/iter (+/- 1,555)
Total chars | Duration |
---|---|
50 | 0.014 ms |
100 | 0.019 ms |
400 | 0.045 ms |
FormatHTML
TODO
License
This project under MIT license.