Durham Hale - Code snippets

JavaScript version of PHP's str_replace() function