You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.
The world of string classes is divided into two parallel hierarchies. One for one-byte data-structures (e.g., nsACString
) and one for two-byte data-structures (e.g., nsAString
). The top of the hierarchy is nsAString
. discuss the relationship of nsAString
to "What is a string?".
There are two other important abstract classes just below nsAString
:
nsASingleFragmentString
nsAFlatString
These abstract classes, and nsAString
most of all, primarily appear in APIs. In your APIs, you will usually want to use nsAString
unless you have a convincing argument for something more specific.