/* String.js Extended methods for strings. :AUTHOR: James Green :CREATED: January 6, 2009 :UPDATED: JG 01/06/2009 - Initial setup. :DEPENDENCIES: None. */ String.prototype.toProperCase = function() { return this.toLowerCase().replace(/^(.)|\s(.)/g, function($1) { return $1.toUpperCase(); }); } String.prototype.toLabelName = function() { return this.replace(/-/g," "); }