function Right(str, n) /*** IN: str - the string we are RIGHTing n - the number of characters we want to return RETVAL: n characters from the right 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 var iLen = String(str).length; return String(str).substring(iLen, iLen - n); } }
file: /Techref/language/asp/js/Right.htm, 0KB, , updated: 2003/4/15 13:50, local time: 2024/11/25 11:59,
18.116.90.161:LOG IN
|
©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://sxlist.com/techref/language/asp/js/Right.htm"> language asp js Right</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.