dist/hashedit.js
function(src, stringToFind, stringToReplace) {

      var temp, index;

      temp = src;
      index = temp.indexOf(stringToFind);

      while (index != -1) {
        temp = temp.replace(stringToFind, stringToReplace);
        index = temp.indexOf(stringToFind);
      }

      return temp;
    }
function(src, stringToFind, stringToReplace) {

      var temp, index;

      temp = src;
      index = temp.indexOf(stringToFind);

      while (index != -1) {
        temp = temp.replace(stringToFind, stringToReplace);
        index = temp.indexOf(stringToFind);
      }

      return temp;
    }
function ( src , stringToFind , stringToReplace ) { var temp , index ; temp = src ; index = temp . indexOf ( stringToFind ) ; while ( index != - 1 ) { temp = temp . replace ( stringToFind , stringToReplace ) ; index = temp . indexOf ( stringToFind ) ; } return temp ; }
Replace all occurrences of a string
@param {String} src - Source string (e.g. haystack)
@param {String} stringToFind - String to find (e.g. needle)
@param {String} stringToReplace - String to replacr
Replace all occurrences of a string