You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none #lockdown Nick.Penwarden #ROBOMERGE-OWNER: ryan.gerleve #ROBOMERGE-AUTHOR: ben.marsh #ROBOMERGE-SOURCE: CL 4662404 in //UE4/Main/... #ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking) [CL 4662413 by ben marsh in Dev-Networking branch]
34 lines
813 B
C++
34 lines
813 B
C++
// Copyright 1998-2019 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;
|
|
}
|