Node.js examples for String:String Value
Count String Leading Spaces
String.prototype.countLeadingSpaces = function() { var a = this.match(/^\s*/); if (a != null && a.length > 0 && a[0].isString) return a[0].length; } //eof/*from w ww . jav a2 s .c om*/