mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
AK: Implement IPv4Address::to_string_reversed()
This commit is contained in:
parent
a4d5745e2f
commit
d1dae5f4d1
1 changed files with 9 additions and 0 deletions
|
@ -57,6 +57,15 @@ public:
|
|||
octet(SubnetClass::D));
|
||||
}
|
||||
|
||||
String to_string_reversed() const
|
||||
{
|
||||
return String::formatted("{}.{}.{}.{}",
|
||||
octet(SubnetClass::D),
|
||||
octet(SubnetClass::C),
|
||||
octet(SubnetClass::B),
|
||||
octet(SubnetClass::A));
|
||||
}
|
||||
|
||||
static Optional<IPv4Address> from_string(const StringView& string)
|
||||
{
|
||||
if (string.is_null())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue