String wont replace after using Replace

been debugging this for quite some time and still cant find a solution, the text is adding the ";"s and removes them in the end, the problem here is that the Replace is not replacing, so at the end the text remains the same. :face_with_spiral_eyes:

public void SomeoneLeft(string user){
	
		if(photonView.isMine){
			print (user);

			teamOneText += ";";
			teamOneText = ";" + teamOneText;
			teamOneText.Replace(";" + user + ";",";;");
			teamOneText = teamOneText.Substring(0, teamOneText.Length - 1);
			teamOneText = teamOneText.Substring(1);

			teamTwoText += ";";
			teamTwoText = ";" + teamTwoText;
			teamTwoText.Replace(";" + user + ";",";;");
			teamTwoText = teamTwoText.Substring(0, teamTwoText.Length - 1);
			teamTwoText = teamTwoText.Substring(1);
		}

	}

The Replace() method returns the replaced string like Substring reuturns a substring, so you have to write

teamOneText = teamOneText.Replace(";" + user + ";",";;");

cheers

yup, I just found that out, haha i feel so stupid, but thanks man!