1if (typeof String.prototype.startsWith != 'function') { 2 String.prototype.startsWith = function (str) { 3 return this.indexOf(str) === 0; 4 }; 5} 6 7String.prototype.countWords = function () { 8 return this.split(/\s+/).length; 9} 10 11function escapeRegExp(string) { 12 return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); 13} 14 15function replaceAllTags(string, find, replace) { 16 return string.replace(new RegExp(escapeRegExp(find), 'g'), replace); 17} 18 19function replaceAll(string, find, replace) { 20 return string.replace(new RegExp(find, 'ig'), replace); 21} 22 23XmlHelper = 24{ 25 GetNodeValueById : function(xml, id) 26 { 27 var result = $.parseXML(xml).getElementsByTagName(id); 28 if(result.length > 0) 29 return $(result).text(); 30 31 return null; 32 }, 33 34 ListNodes : function (xml) 35 { 36 return $.parseXML(xml).firstChild.childNodes; 37 }, 38 39 GetAttributeValue : function(xml, id, attr) 40 { 41 var result = $.parseXML(xml).getElementsByTagName(id); 42 if(result.length > 0) 43 { 44 45 } 46 47 return null; 48 } 49}; 50
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.