Replace

xiaoxiao2021-03-06  95

Package zpxx;

Public class replace {

Public String RCE (String Parentstr, String Ch, String Rep)

{

INT I = Parentstr.indexof (CH);

StringBuffer SB = new stringbuffer ();

IF (i == -1) {

Return ParentsTr;

}

Sb.append (PARENTSTR.SUBSTRING (0, I) Rep);

IF (i ch.Length ()

Sb.append (RCE (PARENTSTR.SUBSTRING (i ch.length (), parentstr.length ()), ch, rep));

}

Return sb.toString ();

}

}

转载请注明原文地址:https://www.9cbs.com/read-104902.html

New Post(0)