score:1

Accepted answer
fn: regex
ticks: 19136772

fn: indexof
ticks: 37457111

score:0

string.replace("somethingblahblah", "someotherthingblahblah")

score:1

result 1

   1. {#somethingblahblah}

result 2

   1. {$someotherthingblahblah}

score:2

stringbuilder sb = new stringbuilder(input);
sb.replace("{$string}", "real value");
sb.replace("{$someotherthingblahblah}", "another real value");
return sb.tostring();

Related Query