Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tknf/japhonex-rust
Japanese phone number checker for Rust.
https://github.com/tknf/japhonex-rust
japanese phonenumber regex rust
Last synced: 8 days ago
JSON representation
Japanese phone number checker for Rust.
- Host: GitHub
- URL: https://github.com/tknf/japhonex-rust
- Owner: tknf
- License: mit
- Created: 2022-03-12T13:29:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-03-12T14:03:31.000Z (over 2 years ago)
- Last Synced: 2024-10-11T18:38:29.270Z (about 1 month ago)
- Topics: japanese, phonenumber, regex, rust
- Language: Rust
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Japhonex Rust
Japanese phone number checker for Rust.
## Installation
```toml
[dependencies]
japhonex = "0.1"
```## Usage
In your Go app you can do something like:
```rust
extern crate japhonex;
use japhonex::japhonex;
use japhonex::HyphenCheck;fn main () {
let r = japhonex(HyphenCheck::Optional);r.is_match("");
}
```### Hyphen validation patterns
### Optional
```rust
let r = japhonex(HyphenCheck::Optional);
// 0xx-xxxx-xxxx or 0xxxxxxxxxx
```
### Required
```rust
let r = japhonex(HyphenCheck::Required);
// 0xx-xxxx-xxxx
```
### No hyphen
```rust
let r = japhonex(HyphenCheck::NoCheck);
// 0xxxxxxxxxx
```## Licence
MIT