Skip to content

martient/ip-to-int

Repository files navigation

ip-to-int

Dart codecov

Usage

Class IpInt

IpInt("<IP-ADDRESS>")
IpInt("127.0.0.1")

toInt

This method return the String ip address as integer

IpInt("<IP-ADDRESS>").toInt()
int integer = IpInt("127.2.3.1").toInt();
print(integer);

2130838273

toIp

This method return the integer as an String ip address

IpInt("<INTEGER>").toIp()
String ipAddress IpInt("2130706433").toIp()
print(ipAddress)

"127.0.0.1"

About

Implementation of ip to int for dart

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages