Working with strings

The String class contains methods that let you work with text strings. Strings are important in working with many objects. The methods described in this chapter are useful in working with strings used in objects such as TextField, StaticText, XML, ContextMenu, and FileReference objects.

Strings are sequences of characters. ActionScript 3.0 supports ASCII and Unicode characters.

Contents

Basics of strings

Creating strings

The length property

Working with characters in strings

Comparing strings

Obtaining string representations of other objects

Concatenating strings

Finding substrings and patterns in strings

Converting strings between uppercase and lowercase

Example: ASCII art