2 releases
0.1.1 | Mar 12, 2022 |
---|---|
0.1.0 | Mar 12, 2022 |
#1728 in Text processing
5KB
Japhonex Rust
Japanese phone number checker for Rust.
Installation
[dependencies]
japhonex = "0.1"
Usage
In your Go app you can do something like:
extern crate japhonex;
use japhonex::japhonex;
use japhonex::HyphenCheck;
fn main () {
let r = japhonex(HyphenCheck::Optional);
r.is_match("<your input>");
}
Hyphen validation patterns
Optional
let r = japhonex(HyphenCheck::Optional);
// 0xx-xxxx-xxxx or 0xxxxxxxxxx
Required
let r = japhonex(HyphenCheck::Required);
// 0xx-xxxx-xxxx
No hyphen
let r = japhonex(HyphenCheck::NoCheck);
// 0xxxxxxxxxx
Licence
MIT
Dependencies
~2–3MB
~53K SLoC