java - unble to replace string -
This is my replacement method in java, but is not ready to replace it for the following.
This is only one
Please help if there is any different method for changing any body?
I tried the Java standard API but it is not working, please Sinnar -> System OutprintLN ("% s" is the place of public static string (string string, string sub, string reporter) {int s, p, q;, "problem", "%", "\%")) ;
Int slen = sub.length (); Stringbuffer Sb = new stringbuffer (); S = 0; P = str.indexOf (sub); Q = p + slain; while (p! = - 1) {sb.append (str.substring (s, p)} sb.append; s = q; p = str.indexOf (sub, s); if (p! = -1) {q = P + slen;}} Sb.append (str.substring (s)); return sb.toString ();}
You can use all the method of replacement. There is a need to be careful about avoiding only \ and% (although I do not fully understand why you need four '\')!
Comments
Post a Comment