String methods
Compare methods
Method | Description |
Equals | Determines if two string objects have the same value. |
Character methods
Method | Description |
IsControl | Indicates whether the specified Unicode character is categorized as a control character. |
IsDigit | Indicates whether a Unicode character is categorized as a decimal digit. |
IsLetter | Indicates whether a Unicode character is categorized as a Unicode letter. |
IsLetterOrDigit | Indicates whether a Unicode character is categorized as a letter or a decimal digit. |
IsLower | Indicates whether a Unicode character is categorized as a lowercase letter. |
IsNumber | Indicates whether a Unicode character is categorized as a number. |
IsPunctuation | Indicates whether a Unicode character is categorized as a punctuation mark. |
IsSeparator | Indicates whether a Unicode character is categorized as a separator character. |
IsSymbol | Indicates whether a Unicode character is categorized as a symbol character. |
IsUpper | Indicates whether a Unicode character is categorized as an uppercase letter. |
IsWhiteSpace | Indicates whether a Unicode character is categorized as white space. |
Find methods
Method | Description |
Contains | Returns a value that indicates whether a specified substring occurs within this string. |
EndsWith | Determines whether the end of this string instance matches a specified string. |
IndexOf | Reports the zero-based index of the first occurrence of a specified Unicode character or string within this instance. The method returns -1 if the character or string is not found in this instance. |
LastIndeOf | Reports the zero-based index position of the last occurrence of a specified Unicode character or string within this instance. The method returns -1 if the character or string is not found in this instance. |
StartsWith | Determines whether the beginning of this string instance matches the specified string. |
Substring | Retrieves a substring from a string. The substring starts at a specified character position and has two overloads that offer different options on length. |
Format methods
Method | Description |
Format | Converts the value of objects to strings based on the formats specified and inserts them into another string. |
Modify methods
Method | Description |
Concat | Concatenates one or more instances of a string, or the string representations of the values of one or more instances of an object. |
Insert | Returns a new string in which a specified string is inserted at a specified index position in this instance. |
Join | Concatenates the elements of a specified array or the members of a collection, using the specified separator between each element or member. |
Left | Returns a string that contains a specified number of characters from the left side of a string. |
PadLeft | Returns a new string of a specified length in which the beginning of the current string is padded with spaces or with a specified Unicode character. |
PadRight | Returns a new string of a specified length in which the end of the current string is padded with spaces or with a specified Unicode character. |
Remove | Returns a new string in which a specified number of characters from the current string are deleted. |
Replace | Returns a new string in which all occurrences of a specified Unicode character or String in the current string are replaced with another specified Unicode character or String. |
Right | Returns a string that contains a specified number of characters from the right side of a string. |
Split | Returns a string array that contains the substrings in this instance that are delimited by elements of a specified string or Unicode character array. |
StringReserve | Returns a string in which the character order of a specified string is reversed. |
ToLower | Returns a copy of the string converted to lowercase. |
ToStream | Returns a copy of the string loaded into a stream. |
ToTextReader | Returns a copy of the string loaded into a TextReader. |
ToUpper | Returns a copy of the string converted to uppercase. |
Trim | Returns a new string in which all leading and trailing occurrences of a set of specified characters from the current string are removed. |
ToProperCase | Returns a copy of the string converted to the appropriate case. |
RemovePunctuation | Returns a copy of the string with all punctuation removed. This can be useful in situations where special characters are not allowed. |
Status methods
Method | Description |
IsDBNullOrEmpty | Indicates whether the specified string is aDBNull, null, or an empty string. |
IsNullOrEmpty | Indicates whether the specified string is null or an empty string. |
Length | Returns the number of characters in the current string object. |
Regex methods
Method | Description |
IsRegexMatch | Indicates whether the regular expression finds a match in the input string. |
RegexReplace | In a specified input string, replaces strings that match a regular expression pattern with a specified replacement string. |
RegexMatch | Searches an input string for a substring that matches a regular expression pattern and returns the first occurrence as a single match object. |
RegexMatches | Searches an input string for all occurrences of a regular expression and returns all the matches. |
RegexSplit | Splits an input string into an array of substrings at the positions defined by a regular expression match. |
ExtractGroup | Extracts a match group from string and RegEx based on a group index. |
ExtractMatchGroup | Extracts a match group from a .NET Match object based on a group index. |
ExtractMatchGroups | Extracts a GroupCollection from a .NET Match object. |
HasEmailAddress | Validates if the input string is an email address. |
HasUrl | Validates if the input string is a URL. |
HasIPAddress | Validates if the input string is an IP address. |
Previous topic Math methods Next topic TimeSpan methods