diff --git a/lib/util.js b/lib/util.js index fc51632d..5e43be92 100644 --- a/lib/util.js +++ b/lib/util.js @@ -134,7 +134,12 @@ Util = exports || {}; Util.removeStr = function(pStr, pSubStr){ return pStr.replace(pSubStr,''); }; - + + Util.replaceStr = function(pStr, pFrom, pTo){ + var lRet = pStr.replace(new RegExp(pFrom, 'g'), pTo); + return lRet; + }; + /** * invoke a couple of functions in paralel *