Crates.io | url_validator |
lib.rs | url_validator |
version | 0.1.4 |
source | src |
created_at | 2023-11-01 20:26:01.885581 |
updated_at | 2023-11-02 15:03:11.789581 |
description | A Rust crate for URL validation |
homepage | |
repository | |
max_upload_size | |
id | 1021745 |
size | 7,653 |
A Rust crate for URL validation.
URL Validator is a simple and lightweight Rust crate that allows you to check if a given string is a valid URL according to specific criteria. It's useful for ensuring that URLs in your Rust applications and scripts meet certain standards.
To use this crate in your Rust project, add it as a dependency in your Cargo.toml
:
[dependencies]
url_validator = "0.1.4"
Incorporate this crate into your Rust application to perform URL validation. The primary function, is_valid_url
, returns true
if the URL is valid and false
otherwise.
extern crate url_validator;
use url_validator::is_valid_url;
fn main() {
let url = "https://www.example.com";
let is_valid = is_valid_url(url);
if is_valid {
println!("Valid URL: {}", url);
} else {
println!("Invalid URL: {}", url);
}
}
Contributions to this project are welcome. If you have any ideas for improvements, new features, or bug fixes, feel free to open an issue or submit a pull request on GitHub.
This crate is open-source and available under the MIT License. You can use it in your projects for free and modify it according to your needs.
Enjoy using URL Validator in your Rust projects! If you have any questions or encounter issues, don't hesitate to reach out.