public static String encodeTemplateNames(String s){
  int i=s.indexOf('{');
  if (i != -1) {
    s=s.replace("{","%7B");
  }
  i=s.indexOf('}');
  if (i != -1) {
    s=s.replace("}","%7D");
  }
  return s;
}

public static String encodeTemplateNames ( String s ) { int i = s . indexOf ( '{' ) ; if ( i != - 1 ) { s = s . replace ( "{" , "%7B" ) ; } i = s . indexOf ( '}' ) ; if ( i != - 1 ) { s = s . replace ( "}" , "%7D" ) ; } return s ; }
encodes a string with template parameters names present , specifically the characters ' { ' and ' } ' will be percent - encoded .
