How to replace substring?

Hi, I want to convert from “E:\Project\Saved\SaveGames” to “E:\Project\Saved\SaveGames”

FString SaveDir = FPaths::ProjectSavedDir() / "SaveGames/";	
FString bara =  "\";
FString bara2 = "\\";
const TCHAR* baras = *bara;
const TCHAR* baras2 = *bara2;
FString NewSaveDir = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*SaveDir);
FString NewSaveDir2 = NewSaveDir.Replace(baras, baras2, ESearchCase::CaseSensitive);

I get errors regarding line 2.
Thankyou.

Hey, you should do :

 FString bara =  TEXT("\");
1 Like

The solution is FString bara = TEXT("/"); FString bara2 = TEXT("\\\\");
Thankyou.

1 Like