You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#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]
34 lines
803 B
C++
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;
|
|
}
|