|
-
Can you optimize this replace code?
String.prototype.replace = function() {
str = this
str=str.split("").join("*");
str=str.split("").join("š");
str=str.split("").join("œ");
str=str.split("").join("ž");
str=str.split("").join("Ÿ");
str=str.split("¢").join("¢");
str=str.split("¥").join("¥");
str=str.split("À").join("À");
str=str.split("Á").join("Á");
str=str.split("Â").join("Â");
str=str.split("Ã").join("Ã");
str=str.split("Ä").join("Ä");
[about 200 more characters ... ]
return str;
}
Don't ask me how we landed on this crappy solution ... 
If you have an idea on how to optimize the code at you will make a lot of poor processors very happy 
Regards
POD
Last edited by podenphant; 11-20-2003 at 11:26 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|