If I have:
string st1 = "this.is.a.string.type";
string st2 = "string";
Is there any built-in String method to remove st2 from st1 if the exact sequence of chars exists in st1? So I want to end up with “this.is.a..type”.
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.
The simplest would be:
but that isn’t necessarily very efficient.