View Single Post
  #4  
Old 03-19-2011, 05:21 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by fowlplay4 View Post
Replace the provided function with:

PHP Code:
function getReplacement(str) {
  
temp.symbols "!@#$%&";
  
temp.int(random(0symbols.length()));
  for (
temp.0temp.str.length(); temp.i++) {
    
temp.newstr @= symbols.charat((temp.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.
__________________
Reply With Quote