 
        function Left(str, n)
        /***
                IN: str - the string we are LEFTing
                    n - the number of characters we want to return
                RETVAL: n characters from the left side of the string
        ***/
        {
                if (n <= 0)     // Invalid bound, return blank string
                        return "";
                else if (n > String(str).length)   // Invalid bound, return
                        return str;                // entire string
                else // Valid bound, return appropriate substring
                        return String(str).substring(0,n);
        }
| file: /Techref/language/asp/js/Left.htm, 0KB, , updated: 2003/4/15 14:50, local time: 2025/10/31 07:06, 
 
216.73.216.212,10-3-97-86:LOG IN | 
| ©2025 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/Left.htm"> language asp js Left</A> | 
| Did you find what you needed? | 
| Welcome to massmind.org! | 
| Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! | 
.