String Methods
The methods of the String class are listed here. For a complete list of String class members, see the String Members topic.
Public Methods
Clone Supported by the .NET Compact Framework. | Returns a reference to this instance of String. |
![]() Compare Supported by the .NET Compact Framework. | Overloaded. Compares two specified String objects. |
![]() CompareOrdinal Supported by the .NET Compact Framework. | Overloaded. Compares two String objects by evaluating the numeric values of the corresponding Char objects in each string. |
CompareTo Supported by the .NET Compact Framework. | Overloaded. Compares this instance with a specified object. |
![]() Concat Supported by the .NET Compact Framework. | Overloaded. Concatenates one or more instances of String, or the String representations of the values of one or more instances of Object. |
![]() Copy Supported by the .NET Compact Framework. | Creates a new instance of String with the same value as a specified String. |
CopyTo Supported by the .NET Compact Framework. | Copies a specified number of characters from a specified position in this instance to a specified position in an array of Unicode characters. |
EndsWith Supported by the .NET Compact Framework. | Determines whether the end of this instance matches the specified String. |
Equals Supported by the .NET Compact Framework. | Overloaded. Overridden. Determines whether two String objects have the same value. |
![]() Format Supported by the .NET Compact Framework. | Overloaded. Replaces each format item in a specified String with the text equivalent of a corresponding object's value. |
GetEnumerator | Retrieves an object that can iterate through the individual characters in this instance. |
GetHashCode Supported by the .NET Compact Framework. | Overridden. Returns the hash code for this instance. |
GetType (inherited from Object)
Supported by the .NET Compact Framework. | Gets the Type of the current instance. |
GetTypeCode Supported by the .NET Compact Framework. | Returns the TypeCode for class String. |
IndexOf Supported by the .NET Compact Framework. | Overloaded. Reports the index of the first occurrence of a String, or one or more characters, within this instance. |
IndexOfAny Supported by the .NET Compact Framework. | Overloaded. Reports the index of the first occurrence in this instance of any character in a specified array of Unicode characters. |
Insert Supported by the .NET Compact Framework. | Inserts a specified instance of String at a specified index position in this instance. |
![]() Intern Supported by the .NET Compact Framework. | Retrieves the system's reference to the specified String. |
![]() IsInterned Supported by the .NET Compact Framework. | Retrieves a reference to a specified String. |
![]() Join Supported by the .NET Compact Framework. | Overloaded. Concatenates a specified separator String between each element of a specified String array, yielding a single concatenated string. |
LastIndexOf Supported by the .NET Compact Framework. | Overloaded. Reports the index position of the last occurrence of a specified Unicode character or String within this instance. |
LastIndexOfAny Supported by the .NET Compact Framework. | Overloaded. Reports the index position of the last occurrence in this instance of one or more characters specified in a Unicode array. |
PadLeft Supported by the .NET Compact Framework. | Overloaded. Right-aligns the characters in this instance, padding on the left with spaces or a specified Unicode character for a specified total length. |
PadRight Supported by the .NET Compact Framework. | Overloaded. Left-aligns the characters in this string, padding on the right with spaces or a specified Unicode character, for a specified total length. |
Remove Supported by the .NET Compact Framework. | Deletes a specified number of characters from this instance beginning at a specified position. |
Replace Supported by the .NET Compact Framework. | Overloaded. Replaces all occurrences of a specified Unicode character or String in this instance, with another specified Unicode character or String. |
Split Supported by the .NET Compact Framework. | Overloaded. Identifies the substrings in this instance that are delimited by one or more characters specified in an array, then places the substrings into a String array. |
StartsWith Supported by the .NET Compact Framework. | Determines whether the beginning of this instance matches the specified String. |
Substring Supported by the .NET Compact Framework. | Overloaded. Retrieves a substring from this instance. |
ToCharArray Supported by the .NET Compact Framework. | Overloaded. Copies the characters in this instance to a Unicode character array. |
ToLower Supported by the .NET Compact Framework. | Overloaded. Returns a copy of this String in lowercase. |
ToString Supported by the .NET Compact Framework. | Overloaded. Overridden. Converts the value of this instance to a String. |
ToUpper Supported by the .NET Compact Framework. | Overloaded. Returns a copy of this String in uppercase. |
Trim Supported by the .NET Compact Framework. | Overloaded. Removes all occurrences of a set of specified characters from the beginning and end of this instance. |
TrimEnd Supported by the .NET Compact Framework. | Removes all occurrences of a set of characters specified in an array from the end of this instance. |
TrimStart Supported by the .NET Compact Framework. | Removes all occurrences of a set of characters specified in an array from the beginning of this instance. |
Protected Methods
Finalize (inherited from Object)
Supported by the .NET Compact Framework. | Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
In C# and C++, finalizers are expressed using destructor syntax. |
MemberwiseClone (inherited from Object)
Supported by the .NET Compact Framework. | Creates a shallow copy of the current Object. |
