MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 656

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

String.substr()
Availability
Flash Player 5.
Usage
my_str.substr(start, [length])
Parameters
An integer that indicates the position of the first character in
start
the substring. If
the string, where the -1 is the last character.
The number of characters in the substring being created. If
length
substring includes all of the characters from the start to the end of the string.
Returns
A substring of the specified string.
Description
Method; returns the characters in a string from the index specified in the
through the number of characters specified in the
not change the string specified by
String.substring()
Availability
Flash Player 5.
Usage
my_str.substring(start, [end])
Parameters
An integer that indicates the position of the first character of
start
substring. Valid values for
0 is used.
An integer that is 1+ the index of the last character in
end
for
are 1 through
end
included in the extracted string. If this parameter is omitted,
parameter is a negative value, 0 is used.
Returns
A string.
Description
Method; returns a string consisting of the characters between the points specified by the
and
parameters. If the
end
the string. If the value of
the value of
start
before the function executes and the original value is unchanged.
656
Chapter 12: ActionScript Dictionary
is a negative number, the starting position is determined from the end of
start
my_str
are 0 through
start
String.length
parameter is not specified, the end of the substring is the end of
end
equals the value of
start
is greater than the value of
parameter. The
length
; it returns a new string.
String.length
. The character indexed by the
, the method returns an empty string. If
end
, the parameters are automatically swapped
end
to be used to create
my_str
is not specified, the
length
parameter
start
substr
used to create the
my_str
- 1. If
is a negative value,
start
to be extracted. Valid values
my_str
parameter is not
end
is used. If this
String.length
method does
start

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Table of Contents