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 |
|---|---|
|
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 |
|---|---|
|
Returns a pointer to the beginning of the current string. |
|
|
Compares two String objects by evaluating the numeric values of the corresponding characters in the two string values represented by the objects. |
|
|
Concatenates the values of two String objects. |
|
|
Returns a pointer to the beginning of the current string. |
|
|
Frees or releases resources. |
|
|
Returns a pointer past the end of the current string. |
|
|
Indicates whether the specified object is equal to the current object. |
|
|
Returns the hash code for this instance. |
|
|
Indicates whether the current String object is empty. |
|
|
Indicates whether the current String object is is participating in a fast pass operation. In a fast pass operation, reference counting is suspended. |
|
|
Retrieves the length of the current String object. |
|
|
Returns a String object whose value is the same as the current string. |
Properties
The String class has the following properties.
|
Member |
Description |
|---|---|
|
Indicates whether two specifed String objects have the same value. |
|
|
Concatenates two String objects into a new String object. |
|
|
Indicates whether the value of one String object is greater than the value of a second String object. |
|
|
Indicates whether the value of one String object is greater than or equal to the value of a second String object. |
|
|
Indicates whether two specifed String objects have different values. |
|
|
Indicates whether the value of one String object is less than the value of a second String object. |