Skip to content

Commit

Permalink
Set crate category to network-programming
Browse files Browse the repository at this point in the history
  • Loading branch information
hiql committed Jul 19, 2024
1 parent d690bec commit cdac8b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "is-ip"
version = "0.1.0"
authors = ["hiql <[email protected]>"]
categories = ["Network programming"]
categories = ["network-programming"]
description = "Check if a string is an IP address"
documentation = "https://docs.rs/is-ip"
edition = "2021"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ is_ipv4("1:2:3:4:5:6:7:8");

## API

#### is_ip(string: &str) -> bool
### is_ip(string: &str) -> bool

Check if `string` is IPv6 or IPv4.

#### is_ipv4(string: &str) -> bool
### is_ipv4(string: &str) -> bool

Check if `string` is IPv4.

#### is_ipv6(string: &str) -> bool
### is_ipv6(string: &str) -> bool

Check if `string` is IPv6.

#### ip_version(string: &str) -> Option<u8>
### ip_version(string: &str) -> Option<u8>

Returns `Some(6)` if `string` is IPv6, `Some(4)` if `string` is IPv4, or `None` if `string` is neither.

Expand Down

0 comments on commit cdac8b2

Please sign in to comment.