Skip to main content

inet_pton

Function inet_pton 

Source
pub fn inet_pton(ip: &[u8]) -> Result<Option<PackedAddr>, NulByteError>
Expand description

PHP inet_pton($ip): IPv6 when the string contains :, IPv4 when it contains ., None (PHP’s false) otherwise or when invalid.