javascript trim | naveenOS https://www.naveenos.com How may I help you - E-Commerce | Full-Stack Developer Tue, 10 Aug 2010 06:27:58 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 Remove side space in string https://www.naveenos.com/2010/08/remove-side-space-in-string https://www.naveenos.com/2010/08/remove-side-space-in-string#comments Thu, 05 Aug 2010 09:54:07 +0000 http://naveenos.com/?p=172 Javascript Trim Functions Use the code below to make trim a method of all Strings. These are useful to place in a global Javascript file included by all your pages. String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); } String.prototype.ltrim = function() { return this.replace(/^\s+/,""); } String.prototype.rtrim = function() { return this.replace(/\s+$/,""); } // example of using […]

The post Remove side space in string first appeared on naveenOS.]]>
https://www.naveenos.com/2010/08/remove-side-space-in-string/feed 1