Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Platform::String Class

Represents a sequential collection of Unicode characters that is used to represent text. For more information and examples, see Strings (C++/CX).

public ref class String sealed : Object,
    IDisposable,
    IEquatable,
    IPrintable

Two iterator functions, which are not members of the String class, can be used with the std::for_each template function to enumerate the characters in a String object.

Member

Description

const char16* begin(String^ s)

Returns a pointer to the beginning of the specified String object.

const char16* end(String^ s)

Returns a pointer past the end of the specified String object.

The String class inherits from Object, and the IDisposable, IEquatable, and IPrintable interfaces.

The String class also has the following types of members.

Constructors

Member

Description

String::String Constructor

Initializes a new instance of the String class.

Methods

The String class inherits the Equals(), Finalize(), GetHashCode(), GetType(), MemberwiseClose(), and ToString() methods from the Platform::Object Class. String also has the following methods.

Method

Description

String::Begin Method

Returns a pointer to the beginning of the current string.

String::CompareOrdinal Method

Compares two String objects by evaluating the numeric values of the corresponding characters in the two string values represented by the objects.

String::Concat Method

Concatenates the values of two String objects.

String::Data Method

Returns a pointer to the beginning of the current string.

String::Dispose Method

Frees or releases resources.

String::End Method

Returns a pointer past the end of the current string.

String::Equals Method

Indicates whether the specified object is equal to the current object.

String::GetHashCode Method

Returns the hash code for this instance.

String::IsEmpty Method

Indicates whether the current String object is empty.

String::IsFastPass Method

Indicates whether the current String object is is participating in a fast pass operation. In a fast pass operation, reference counting is suspended.

String::Length Method

Retrieves the length of the current String object.

String::ToString Method (C++/CX)

Returns a String object whose value is the same as the current string.

Properties

The String class has the following properties.

Member

Description

String::operator== Operator (C++/CX)

Indicates whether two specifed String objects have the same value.

operator+ Operator

Concatenates two String objects into a new String object.

String::operator> Operator (C++/CX)

Indicates whether the value of one String object is greater than the value of a second String object.

String::operator>= Operator (C++/CX)

Indicates whether the value of one String object is greater than or equal to the value of a second String object.

String::operator!= Operator (C++/CX)

Indicates whether two specifed String objects have different values.

String::operator< Operator (C++/CX)

Indicates whether the value of one String object is less than the value of a second String object.

Minimum supported client: Windows 8

Minimum supported server: Windows Server 2012

Namespace: Platform

Header vccorlib.h (included by default)

Show:
© 2014 Microsoft