Quote:
Originally Posted by fowlplay4
Replace the provided function with:
PHP Code:
function getReplacement(str) {
temp.symbols = "!@#$%&";
temp.s = int(random(0, symbols.length()));
for (temp.i = 0; temp.i < str.length(); temp.i++) {
temp.newstr @= symbols.charat((temp.s + temp.i)%symbols.length());
}
return temp.newstr;
}
Perhaps a getReplacementSymbols config option could be added.
|
getReplacement's parameter is the length of the string to replace, not the string—otherwise that should work.