question: public static String replaceString ( String string , String orig , String substitution ) { int idx = string . indexOf ( orig ) ; while ( idx != - 1 ) { string = string . substring ( 0 , idx ) + substitution + string . substring ( idx + orig . length ( ) ) ; idx = string . indexOf ( orig , idx + substitution . length ( ) ) ; } return string ; }
target:  Replaces character/s in a string with another.