String Replace With Slash. The String. The replace() method returns a new string with t