Crates.io | japhonex |
lib.rs | japhonex |
version | 0.1.1 |
source | src |
created_at | 2022-03-12 13:30:58.454383 |
updated_at | 2022-03-12 14:03:43.259736 |
description | Japanese phone number checker for Rust |
homepage | https://github.com/tknf/japhonex-rust |
repository | https://github.com/tknf/japhonex-rust |
max_upload_size | |
id | 548765 |
size | 5,381 |
Japanese phone number checker for Rust.
[dependencies]
japhonex = "0.1"
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>");
}
let r = japhonex(HyphenCheck::Optional);
// 0xx-xxxx-xxxx or 0xxxxxxxxxx
let r = japhonex(HyphenCheck::Required);
// 0xx-xxxx-xxxx
let r = japhonex(HyphenCheck::NoCheck);
// 0xxxxxxxxxx
MIT