Returns a section of a string. stringObj.slice(start, [end]) Arguments
RemarksThe slice method returns a String object containing the specified portion of stringObj. The slice method copies up to, but not including, the element indicated by end. If start is negative, it is treated as length + start where length is the length of the string. If end is negative, it is treated as length + end where length is the length of the string. If end is omitted, extraction continues to the end of stringObj. If end occurs before start, no characters are copied to the new string. ExampleIn the following example, the two uses of the slice method return the same result. In the second example, negative one (-1) points to the last character in str1. RequirementsSee AlsoArray Object | slice Method (Array) | String Object Methods Applies To: String Object |
Contact Us | E-Mail this Page | MSDN Flash Newsletter |
© 2002 Microsoft Corporation. All rights reserved. Terms of Use Privacy Statement Accessibility |
file: /Techref/language/asp/js/slice.htm, 5KB, , updated: 2003/8/9 08:06, local time: 2024/12/22 10:00,
owner: JMN-EFP-786,
3.137.219.221: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/slice.htm"> slice</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! |
.