Javascript String dashToUnderline(str)
String.prototype.dashToUnderline = function(str) { if(str == undefined) { str = this;/*from w w w . ja v a2s . c o m*/ } return str.replace(/-/g, '_'); }