/Engine/Source/Runtime/Engine/Classes/Kismet/BlueprintPathsLibrary.h
Normalize all / and \ to TEXT("/") and remove any trailing TEXT("/") if the character before that is not a TEXT("/") or a colon
static void NormalizeDirectoryName ( const [FString](API\Runtime\Core\Containers\FString) & InPath, [FString](API\Runtime\Core\Containers\FString) & OutPath )