String Members
The String type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
String(array<Char>[]()[][]) |
Initializes a new instance of the String class to the value indicated by an array of Unicode characters.
|
![]() |
String()()()() |
The String global object is a constructor for strings, or a sequence of characters.
|
![]() |
String(Object) |
The String global object is a constructor for strings, or a sequence of characters.
|
![]() |
String(Char, Int32) |
Initializes a new instance of the String class to the value indicated by a specified Unicode character repeated a specified number of times.
|
![]() |
String(array<Char>[]()[][], Int32, Int32) |
Initializes a new instance of the String class to the value indicated by an array of Unicode characters, a starting character position within that array, and a length.
|
Methods
Name | Description | |
---|---|---|
![]() |
CharAt |
The charAt() method returns the specified character from a string.
|
![]() |
CharCodeAt |
The charCodeAt() method returns the numeric Unicode value of the character at the given index (except for unicode codepoints > 0x10000).
|
![]() ![]() |
Compare(String, String) |
Compares two specified String objects and returns an integer that indicates their relative position in the sort order.
|
![]() ![]() |
Compare(String, String, Boolean) |
Compares two specified String objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.
|
![]() ![]() |
Compare(String, Int32, String, Int32, Int32) |
Compares substrings of two specified String objects and returns an integer that indicates their relative position in the sort order.
|
![]() ![]() |
Compare(String, Int32, String, Int32, Int32, Boolean) |
Compares substrings of two specified String objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.
|
![]() ![]() |
Compare(String, String, StringComparison) | |
![]() ![]() |
Compare(String, String, Boolean, CultureInfo) | |
![]() ![]() |
Compare(String, Int32, String, Int32, Int32, StringComparison) | |
![]() ![]() |
Compare(String, Int32, String, Int32, Int32, Boolean, CultureInfo) | |
![]() |
CompareTo |
Compares this instance with a specified String object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified string.
|
![]() ![]() |
Concat(IEnumerable<(Of <<'(String>)>>)) |
Concatenates the members of a constructed IEnumerable collection of type String.
|
![]() ![]() |
Concat(String, String) |
Concatenates two specified instances of String.
|
![]() ![]() |
Concat(String, String, String) |
Concatenates three specified instances of String.
|
![]() ![]() |
Concat(String, String, String, String) |
Concatenates four specified instances of String.
|
![]() ![]() |
Concat(array<String>[]()[][]) |
Concatenates the elements of a specified String array.
|
![]() ![]() |
Concat(Object) |
Creates the string representation of a specified object.
|
![]() ![]() |
Concat(Object, Object) |
Concatenates the string representations of two specified objects.
|
![]() ![]() |
Concat(Object, Object, Object) |
Concatenates the string representations of three specified objects.
|
![]() ![]() |
Concat(Object, Object, Object, Object) |
Concatenates the string representations of four specified objects and any objects specified in an optional variable length parameter list.
|
![]() ![]() |
Concat(array<Object>[]()[][]) |
Concatenates the string representations of the elements in a specified Object array.
|
![]() ![]() |
Concat<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) |
Concatenates the members of a constructed generic IEnumerable collection.
|
![]() |
Contains |
Returns a value indicating whether a specified substring occurs within this string.
|
![]() |
EndsWith |
Determines whether the end of this string instance matches the specified string.
|
![]() ![]() |
Equals(String, String) |
Determines whether two specified String objects have the same value.
|
![]() ![]() |
Equals(String, String, StringComparison) |
Determines whether two specified String objects have the same value. A parameter specifies the culture, case, and sort rules used in the comparison.
|
![]() |
Equals(String, StringComparison) |
Determines whether this string and a specified String object have the same value. A parameter specifies the culture, case, and sort rules used in the comparison.
|
![]() |
Equals(String) |
Determines whether this instance and another specified String object have the same value.
|
![]() ![]() |
Format(String, array<Object>[]()[][]) |
Replaces the format item in a specified string with the string representation of a corresponding object in a specified array.
|
![]() ![]() |
Format(String, Object) | |
![]() ![]() |
Format(IFormatProvider, String, array<Object>[]()[][]) | |
![]() ![]() |
Format(String, Object, Object) | |
![]() ![]() |
Format(String, Object, Object, Object) | |
![]() ![]() |
FromCharCode()()()() |
The static String.fromCharCode() method returns a string created by using the specified sequence of Unicode values.
|
![]() ![]() |
FromCharCode(array<Int32>[]()[][]) |
The static String.fromCharCode() method returns a string created by using the specified sequence of Unicode values.
|
![]() |
GetEnumerator |
Retrieves an object that can iterate through the individual characters in this string.
|
![]() |
IndexOf(Char) |
Reports the zero-based index of the first occurrence of the specified Unicode character in this string.
|
![]() |
IndexOf(Char, Int32) |
Reports the zero-based index of the first occurrence of the specified Unicode character in this string. The search starts at a specified character position.
|
![]() |
IndexOf(String) |
Reports the zero-based index of the first occurrence of the specified string in this instance.
|
![]() |
IndexOf(String, Int32) |
Reports the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position.
|
![]() |
IndexOf(Char, Int32, Int32) |
Reports the zero-based index of the first occurrence of the specified character in this instance. The search starts at a specified character position and examines a specified number of character positions.
|
![]() |
IndexOf(String, Int32, Int32) |
Reports the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position and examines a specified number of character positions.
|
![]() |
IndexOf(String, StringComparison) |
Reports the zero-based index of the first occurrence of the specified string in the current System.String object. A parameter specifies the type of search
to use for the specified string.
|
![]() |
IndexOf(String, Int32, StringComparison) |
Reports the zero-based index of the first occurrence of the specified string in the current System.String object. Parameters specify the starting search
position in the current string and the type of search to use for the specified string.
|
![]() |
IndexOf(String, Int32, Int32, StringComparison) |
Reports the zero-based index of the first occurrence of the specified string in the current System.String object. Parameters specify the starting search
position in the current string, the number of characters in the current string
to search, and the type of search to use for the specified string.
|
![]() |
IndexOfAny(array<Char>[]()[][]) |
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters.
|
![]() |
IndexOfAny(array<Char>[]()[][], Int32) |
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. The search starts at a specified character position.
|
![]() |
IndexOfAny(array<Char>[]()[][], Int32, Int32) |
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. The search starts at a specified character position and examines a specified number of character positions.
|
![]() |
Insert |
Returns a new string in which a specified string is inserted at a specified index position in this instance.
|
![]() ![]() |
IsNullOrEmpty |
Indicates whether the specified string is null or an Empty string.
|
![]() ![]() |
IsNullOrWhiteSpace |
Indicates whether a specified string is null, empty, or consists only of white-space characters.
|
![]() ![]() |
Join(String, array<String>[]()[][]) |
Concatenates all the elements of a string array, using the specified separator between each element.
|
![]() ![]() |
Join(String, array<Object>[]()[][]) |
Concatenates the elements of an object array, using the specified separator between each element.
|
![]() ![]() |
Join(String, IEnumerable<(Of <<'(String>)>>)) | |
![]() ![]() |
Join(String, array<String>[]()[][], Int32, Int32) |
Concatenates the specified elements of a string array, using the specified separator between each element.
|
![]() ![]() |
Join<(Of <<'(T>)>>)(String, IEnumerable<(Of <<'(T>)>>)) | |
![]() |
JsSubstring(Int32) |
The substring() method returns a subset of a string between one index and another, or through the end of the string.
|
![]() |
JsSubstring(Int32, Int32) |
The substring() method returns a subset of a string between one index and another, or through the end of the string.
|
![]() |
LastIndexOf(Char) |
Reports the zero-based index position of the last occurrence of a specified Unicode character within this instance.
|
![]() |
LastIndexOf(String) |
Reports the zero-based index position of the last occurrence of a specified string within this instance.
|
![]() |
LastIndexOf(String, Int32) |
Reports the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string.
|
![]() |
LastIndexOf(Char, Int32, Int32) |
Reports the zero-based index position of the last occurrence of the specified Unicode character in a substring within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.
|
![]() |
LastIndexOf(String, Int32, Int32) |
Reports the zero-based index position of the last occurrence of a specified string within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.
|
![]() |
LastIndexOf(Char, Int32) |
Reports the zero-based index position of the last occurrence of a specified Unicode character within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string.
|
![]() |
LastIndexOfAny(array<Char>[]()[][]) |
Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array.
|
![]() |
LastIndexOfAny(array<Char>[]()[][], Int32) |
Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array. The search starts at a specified character position and proceeds backward toward the beginning of the string.
|
![]() |
LastIndexOfAny(array<Char>[]()[][], Int32, Int32) |
Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in a Unicode array. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.
|
![]() |
LocaleCompare(String) |
The localeCompare() method returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.
The new locales and options arguments let applications specify the language whose sort order should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale and sort order used are entirely implementation dependent.
|
![]() |
LocaleCompare(String, String) |
The localeCompare() method returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.
The new locales and options arguments let applications specify the language whose sort order should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale and sort order used are entirely implementation dependent.
|
![]() |
LocaleCompare(String, String, LocaleOptions) |
The localeCompare() method returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.
The new locales and options arguments let applications specify the language whose sort order should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale and sort order used are entirely implementation dependent.
|
![]() |
Match(Regex) |
The match() method retrieves the matches when matching a string against a regular expression.
|
![]() |
Match(String) |
The match() method retrieves the matches when matching a string against a regular expression.
|
![]() |
PadLeft(Int32) |
Returns a new string that right-aligns the characters in this instance by padding them with spaces on the left, for a specified total length.
|
![]() |
PadLeft(Int32, Char) |
Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a specified total length.
|
![]() |
PadRight(Int32) |
Returns a new string that left-aligns the characters in this string by padding them with spaces on the right, for a specified total length.
|
![]() |
PadRight(Int32, Char) |
Returns a new string that left-aligns the characters in this string by padding them on the right with a specified Unicode character, for a specified total length.
|
![]() |
Remove(Int32) |
Returns a new string in which all the characters in the current instance, beginning at a specified position and continuing through the last position, have been deleted.
|
![]() |
Remove(Int32, Int32) |
Returns a new string in which a specified number of characters in the current instance beginning at a specified position have been deleted.
|
![]() |
Replace(Regex, String) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Replace(Regex, Delegate) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Replace(Regex, Func<(Of <<'(String, String>)>>)) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Replace(Regex, Func<(Of <<'(String, Int32, String>)>>)) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Replace(Regex, Func<(Of <<'(String, Int32, String, String>)>>)) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Replace(String, String) |
Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string.
|
![]() |
Replace(Char, Char) |
Returns a new string in which all occurrences of a specified Unicode character in this instance are replaced with another specified Unicode character.
|
![]() |
Replace(String, Delegate) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Replace(String, Func<(Of <<'(String, String>)>>)) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Replace(String, Func<(Of <<'(String, Int32, String>)>>)) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Replace(String, Func<(Of <<'(String, Int32, String, String>)>>)) |
The replace() method returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a Regex, and the replacement can be a string or a function to be called for each match.
|
![]() |
Search(Regex) |
The search() method executes a search for a match between a regular expression and this String object.
|
![]() |
Search(String) |
The search() method executes a search for a match between a regular expression and this String object.
|
![]() |
Slice(Int32) |
The slice() method extracts a section of a string and returns a new string.
|
![]() |
Slice(Int32, Int32) |
The slice() method extracts a section of a string and returns a new string.
|
![]() |
Split(array<Char>[]()[][]) |
Splits a string into substrings that are based on the characters in an array.
|
![]() |
Split(array<Char>[]()[][], Int32) |
Splits a string into a maximum number of substrings based on the characters in an array. You also specify the maximum number of substrings to return.
|
![]() |
Split(array<Char>[]()[][], Int32, StringSplitOptions) | |
![]() |
Split(array<Char>[]()[][], StringSplitOptions) | |
![]() |
Split(array<String>[]()[][], StringSplitOptions) | |
![]() |
Split(array<String>[]()[][], Int32, StringSplitOptions) | |
![]() |
Split(String) | |
![]() |
Split(Char) | |
![]() |
Split(Regex) | |
![]() |
Split(Char, Int32) | |
![]() |
Split(Regex, Int32) | |
![]() |
Split(String, Int32) | |
![]() |
StartsWith |
Determines whether the beginning of this string instance matches the specified string.
|
![]() |
Substr(Int32) |
The substr() method returns the characters in a string beginning at the specified location through the specified number of characters.
|
![]() |
Substr(Int32, Int32) |
The substr() method returns the characters in a string beginning at the specified location through the specified number of characters.
|
![]() |
Substring(Int32) |
Retrieves a substring from this instance. The substring starts at a specified character position and continues to the end of the string.
|
![]() |
Substring(Int32, Int32) |
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.
|
![]() |
ToCharArray()()()() |
Copies the characters in this instance to a Unicode character array.
|
![]() |
ToCharArray(Int32, Int32) |
Copies the characters in a specified substring in this instance to a Unicode character array.
|
![]() |
ToLower |
Returns a copy of this string converted to lowercase.
|
![]() |
ToUpper |
Returns a copy of this string converted to uppercase.
|
![]() |
Trim()()()() |
Removes all leading and trailing white-space characters from the current String object.
|
![]() |
Trim(array<Char>[]()[][]) |
Removes all leading and trailing occurrences of a set of characters specified in an array from the current String object.
|
![]() |
TrimEnd(array<Char>[]()[][]) |
Removes all trailing occurrences of a set of characters specified in an array from the current String object.
|
![]() |
TrimEnd()()()() | |
![]() |
TrimStart(array<Char>[]()[][]) |
Removes all leading occurrences of a set of characters specified in an array from the current String object.
|
![]() |
TrimStart()()()() |
Operators
Name | Description | |
---|---|---|
![]() ![]() |
Equality |
Determines whether two specified strings have the same value.
|
![]() ![]() |
Inequality |
Determines whether two specified strings have different values.
|