Skip to main content

calicoder

Member since Dec 11, 2008

Recent Blog Comments By calicoder

  • Ask Ben: Javascript String Replace Method

    Posted on Jul 25, 2008 at 8:32 PM

    previous post should be stringValue.replaceAll("&", "& amp;"); ** no space **... read more »

  • Ask Ben: Javascript String Replace Method

    Posted on Jul 25, 2008 at 8:29 PM

    Your replaceAll code is *** NOT SAFE *** You should be using javascript's regular expression support for this instead of a loop: stringValue.replace(/something/g, "something else"); Your solution causes infinite loop. Example: stringValue.replaceAll("&", "&"); In this scenario you'd like t... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel