static public void unreplace ( StringBuilder sb , String out , char in ) { int pos ; while ( 0 <= ( pos = sb . indexOf ( out ) ) ) { sb . setCharAt ( pos , in ) ; sb . delete ( pos + 1 , pos + out . length ( ) ) ; } }
Replace any String out in sb with char in .