getrailo/railo — pull request #382 by igal-getrailo (2014-03-11 17:30:42+00:00)
Title: improve performance of StringUtil.replace()

if the "find" is not found in input then there is no reason to create a StringBuilder and return a new string object.

this change makes `Replace(input, find, replace)` more performant than

if (Find(input, find))
input = Replace(input, find, replace);

do you have a testcase for function replace()? I don't see one in railo-tests/functions