i'm trying write if statement checks if string contains character /.
if contained, replaced \\.
is there way that?
the concise way use replaceall() method of string , regular expression:
newstr = oldstr.replaceall("/", "\\\\"); i'm trying write if statement checks if string contains character /.
if contained, replaced \\.
is there way that?
the concise way use replaceall() method of string , regular expression:
newstr = oldstr.replaceall("/", "\\\\");
Comments
Post a Comment