Crates.io | mynumber |
lib.rs | mynumber |
version | 0.2.0 |
source | src |
created_at | 2015-11-19 13:18:16.533157 |
updated_at | 2015-12-12 23:55:19.918092 |
description | My Number validator |
homepage | https://github.com/Tomohiro/mynumber |
repository | https://github.com/Tomohiro/mynumber |
max_upload_size | |
id | 3455 |
size | 3,164 |
My Number validator for Rust
Put this in your Cargo.toml
:
[dependencies]
mynumber = "0.1"
Put this in your crate root:
extern crate mynumber;
fn main() {
match mynumber::verify("123456789018") {
Ok(()) => println!("valid"),
Err(e) => println!("invalid: {:?}", e),
}
}
extern crate mynumber;
use mynumber::individual;
fn main() {
match individual::verify("123456789018") {
Ok(()) => println!("valid"),
Err(e) => println!("invalid: {:?}", e),
}
}
extern crate mynumber;
use mynumber::corporate;
fn main() {
match corporate::verify("9234567890123") {
Ok(()) => println!("valid"),
Err(e) => println!("invalid: {:?}", e),
}
}
Please check out the CONTIRBUTING guideline.
© 2015 Tomohiro TAIRA.
This project is licensed under the MIT license. See LICENSE for details.