May 2001
Intermediate to advanced
720 pages
23h 24m
English
String.charCodeAt( ) Method — retrieve the code point of the character at a specific position in a string
Flash 5
string.charCodeAt(index)
The integer position of a character in
string, which should be in the range 0
(the first character) to
string
.length-1 (the
last character).
An integer representing the Latin 1 or Shift-JIS code point, as shown
in Appendix B, of the character in the position
index within
string.
var msg = "A is the first letter of the Latin alphabet."; trace(msg.charCodeAt(0)); // Displays: 65 (the code for the "A" character) trace(msg.charCodeAt(1)); // Displays: 32 (the code for the space character)
String.charAt( ), String.fromCharCode(
); Appendix B, Section 4.6.9.2 in Chapter 4
Read now
Unlock full access