convert string into a 32-bit integer.
For example, given an IP address “172.168.5.1”, the output should be a 32-bit integer with “172” as the highest order 8 bit, 168 as the second highest order 8 bit, 5 as the second lowest order 8 bit, and 1 as the lowest order 8 bit. That is,
"172.168.5.1" => 2896692481
a string with spaces between a digit and a dot is a valid input; while a string with spaces between two digits is not.
- "172[Space].[Space]168.5.1" is a valid input. Should process the output normally.
- "1[Space]72.168.5.1" is not a valid input. Should report an error.
yarn install
yarn dev
open index.html
yarn test
MIT