Characters and Strings in ActionScript

Notes:

Characters and Strings in ActionScript Programming Language:

String: indicates sequence of characters enclosed in double quotations or single quotations
i.e. Textual data [ array of characters ].
Ex:
“Hello World”
‘Hello JavaScript’
“22+22”
etc.

Note:
If a string begins with single quote then it has to end with single quote and
If a string begins with double quote then it has to end with double quote.

Character: indicates any symbol from the character set of action script language.
Ex:
Alphabets: A-Z, a-z,
Digits: 0 – 9,
Special characters (+,-,*, &, %, {, }, [, ], etc.)
Escape sequence characters (\n, \t, \”, \’, \\),
Unicode characters (\u0000 to \uFFFF ) etc.

Note:
As action script characters are Unicode characters, we know that Unicode character set is of 16 bit (2 bytes) character set. Hence each character occupies 2 bytes of memory location.
Using Unicode character set we can represent pow(2,16) = 65536 characters.

Formula for evaluating the size of any string:
size of string = 2 * number of characters in the string
Ex:
size of “Hello” = 2 * 5 = 10 bytes
size of “Hello World” = 2 * 11 = 22 bytes