function LTrim(str) /*** PURPOSE: Remove leading blanks from our string. IN: str - the string we want to LTrim RETVAL: An LTrimmed string! ***/ { var whitespace = new String(" \t\n\r"); var s = new String(str); if (whitespace.indexOf(s.charAt(0)) != -1) { // We have a string with leading blank(s)... var j=0, i = s.length; // Iterate from the far left of string until we // don't have any more whitespace... while (j < i && whitespace.indexOf(s.charAt(j)) != -1) j++; // Get the substring from the first non-whitespace // character to the end of the string... s = s.substring(j, i); } return s; }
file: /Techref/language/asp/js/LTrim.htm, 1KB, , updated: 2008/1/31 16:14, local time: 2024/11/8 23:26,
3.239.90.61:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/techref/language/asp/js/LTrim.htm"> language asp js LTrim</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to techref.massmind.org! |
.