Files
UnrealEngineUWP/Engine/Source/Programs/DotNETCommon/DotNETUtilities/Perforce/PerforceUtils.cs
Ryan Durand 9ef3748747 Updating copyrights for Engine Programs.
#rnx
#rb none
#jira none

#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869242 in //Fortnite/Release-12.00/... via CL 10869536
#ROBOMERGE-BOT: FORTNITE (Main -> Dev-EngineMerge) (v613-10869866)

[CL 10870955 by Ryan Durand in Main branch]
2019-12-26 23:01:54 -05:00

35 lines
833 B
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tools.DotNETCommon.Perforce
{
public static class PerforceUtils
{
static public string EscapePath(string Path)
{
string NewPath = Path;
NewPath = NewPath.Replace("%", "%25");
NewPath = NewPath.Replace("*", "%2A");
NewPath = NewPath.Replace("#", "%23");
NewPath = NewPath.Replace("@", "%40");
return NewPath;
}
static public string UnescapePath(string Path)
{
string NewPath = Path;
NewPath = NewPath.Replace("%40", "@");
NewPath = NewPath.Replace("%23", "#");
NewPath = NewPath.Replace("%2A", "*");
NewPath = NewPath.Replace("%2a", "*");
NewPath = NewPath.Replace("%25", "%");
return NewPath;
}
}
}