validip: validip

View source: R/validip.r

validipR Documentation

validip

Description

Check if a string is a valid IP address. Currently only IPv4 addresses are supported.

Usage

validip(ip)

Arguments

ip

A string or vector of strings.

Details

This function is not like a 'ping'. It merely checks if the string is correctly formatted and could theoretically be a valid IP address.

Value

Returns TRUE if the input is a potentially valid IP address, and FALSE otherwise.

Examples

library(getip)

validip(c("192.168.1.1", "700.168.1.1"))


wrathematics/getip documentation built on Jan. 28, 2024, 12:12 p.m.