Crates.io | yansongda-utils |
lib.rs | yansongda-utils |
version | 1.0.2 |
source | src |
created_at | 2023-02-05 13:51:23.978316 |
updated_at | 2023-07-08 13:20:20.9829 |
description | rust 中一些关于我自己的常用工具 |
homepage | |
repository | https://github.com/yansongda/rust-utils |
max_upload_size | |
id | 777115 |
size | 20,374 |
[dependencies]
yansongda-utils = { version = "~1.0.0", features = ["phone"] }
use yansongda_utils::phone;
// 是否是手机号码
assert!(phone::is_mobile("13800138000"));
// 是否是固定电话
assert!(phone::is_telephone("01012345678"));
// 是否是服务号码
assert!(phone::is_service("12345678"));
// 是否是长途
assert!(phone::is_idd("0012345678"));