3
Answers

replace same words in a string with different words

Photo of darma teja

darma teja

8y
589
1
Hi All,
 
I have a string like this:
string s= "it is an \"Auto\" and The \"Auto\" has three seats and blabla \"Auto\" "
i want to to replace Auto with unique numbers, the output should be like this:
"it is an "Auto1" and The "Auto2" has three seats and blabla "Auto3" "
 
Thanks,
Darma 

Answers (3)