String.Replace problem ,,

Hello ,

i am having a problem with String.Replace

Example :

var ExampleText : String = "Text";

function Replace()
{

    ExampleText.Replace("T","");

}

The problem is that it replace both the T letters is there a way to make it replace just one without the other one ?

Well, which one? Assuming you mean only the first:

string x = "Text";
int index = x.IndexOf(" ");
x = index >=0 ? x.Insert(index, "") : x;