I want to need to find a string, replace the string by another string.
For example, replace ‘apple’ to ‘orange’ in the following string.
“I love apple”
What function should I use?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since this question is tagged C++/CLI, I’m assuming you’re referring to managed String objects.
If so, then there’s a Replace method on the String class you can use.