Files
UnrealEngineUWP/Engine/Source/Runtime/Networking/Private/IPv4/IPv4SubnetMask.cpp
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

34 lines
803 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Interfaces/IPv4/IPv4SubnetMask.h"
/* FIpAddress4 interface
*****************************************************************************/
FString FIPv4SubnetMask::ToString() const
{
return FString::Printf(TEXT("%i.%i.%i.%i"), A, B, C, D);
}
/* FIpAddress4 static interface
*****************************************************************************/
bool FIPv4SubnetMask::Parse(const FString& MaskString, FIPv4SubnetMask& OutMask)
{
TArray<FString> Tokens;
if (MaskString.ParseIntoArray(Tokens, TEXT("."), false) == 4)
{
OutMask.A = FCString::Atoi(*Tokens[0]);
OutMask.B = FCString::Atoi(*Tokens[1]);
OutMask.C = FCString::Atoi(*Tokens[2]);
OutMask.D = FCString::Atoi(*Tokens[3]);
return true;
}
return false;
}