Skip to content

IP Address Parsers #234

Description

@Entomy

Bartosz Adamczewski showed here a "better" way to do IPv4 parsing than the Regex based approach most people use. His approach isn't entirely the best way to do this, and in the comments I made some clarifications. But it did remind me that this should be implemented because of the sheer amount of people who don't know how to efficiently do this.

A very similar approach is possible for IPv6 addresses as well.

The only thing I haven't worked out, because I'm not familiar with .NET's networking components, is with respect to the return type. Is there an IPv4 type? I don't know. Would it make more sense to return a tuple? I don't know.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions