public static String replaceStrings(String properties,String property,String value){
  StringBuilder sb=new StringBuilder();
  int start=0;
  int index=properties.indexOf(property);
  while (index != -1) {
    sb.append(properties.substring(start,index));
    sb.append(value);
    start=index + property.length();
    index=properties.indexOf(property,start);
  }
  sb.append(properties.substring(start));
  return sb.toString();
}

public static String replaceStrings ( String properties , String property , String value ) { StringBuilder sb = new StringBuilder ( ) ; int start = 0 ; int index = properties . indexOf ( property ) ; while ( index != - 1 ) { sb . append ( properties . substring ( start , index ) ) ; sb . append ( value ) ; start = index + property . length ( ) ; index = properties . indexOf ( property , start ) ; } sb . append ( properties . substring ( start ) ) ; return sb . toString ( ) ; }
replaces all occurrences of a given string in the properties argument with the given value
