System.UnicodeString

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

type UnicodeString = { built-in type };

C++

class RTL_DELPHIRETURN UnicodeString

Properties

Type Visibility Source Unit Parent
type
class
public
System.pas
ustring.h
System System

Description

UnicodeString is the C++ analog for the Object Pascal UnicodeString type.

Object Pascal utilizes several string types. UnicodeString can contain both Unicode and ANSI strings, ANSI strings being converted first. Support for this type includes the following features:

  • Strings as large as available memory.
  • Efficient use of memory through shared references.
  • Routines and operators that evaluate strings based on the current locale.

Despite its name, UnicodeString can represent both Unicode strings and ANSI strings, ANSI strings being converted first.

UnicodeString variables that have not been assigned an initial value contain a zero-length string.

Note: Object Pascal also supports UnicodeString, but implements it as a primitive type rather than a class. By default, variables declared as type String are UnicodeString.

Note: To be compatible with Object Pascal desktop compilers, UnicodeString indexing is 1-based. If you are using Object Pascal mobile compilers, UnicodeString indexing is 0-based; for more information, see Migrating Object Pascal Code to Mobile from Desktop.

See Also