S > String.slice
String.sliceSyntax
myString
.slice(
start
,end
);
Arguments
start
A number specifying the index of the starting point for the slice. If start
is a negative number, the starting point is determined from the end of the string, where -1 is the last character.
end
A number specifying the index of the ending point for the slice. If end
is not specified, the slice includes all characters from the start to the end of the string. If end
is a negative number, the ending point is determined from the end of the string, where -1 is the last character.
Description
Method; extracts a slice, or substring, of the specified String object; then returns it as a new string without modifying the original String object. The returned string includes the start
character and all characters up to (but not including) the end
character.
Player
Flash 5 or later.