StringSegment.IndexOfAny Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
IndexOfAny(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. |
IndexOfAny(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(Char[]) |
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. |
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
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.
public:
int IndexOfAny(cli::array <char> ^ anyOf, int startIndex, int count);
public int IndexOfAny (char[] anyOf, int startIndex, int count);
member this.IndexOfAny : char[] * int * int -> int
Public Function IndexOfAny (anyOf As Char(), startIndex As Integer, count As Integer) As Integer
Parameters
- anyOf
- Char[]
A Unicode character array containing one or more characters to seek.
- startIndex
- Int32
The search starting position.
- count
- Int32
The number of character positions to examine.
Returns
The zero-based index position of the first occurrence in this instance where any character in anyOf
was found; -1 if no character in anyOf
was found.
Exceptions
anyOf
is null
.
startIndex
or count
is less than zero, or startIndex
+ count
is
greater than Length.
Applies to
.NET 9 (package-provided) e altre versioni
Prodotto | Versioni |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
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.
public:
int IndexOfAny(cli::array <char> ^ anyOf, int startIndex);
public int IndexOfAny (char[] anyOf, int startIndex);
member this.IndexOfAny : char[] * int -> int
Public Function IndexOfAny (anyOf As Char(), startIndex As Integer) As Integer
Parameters
- anyOf
- Char[]
A Unicode character array containing one or more characters to seek.
- startIndex
- Int32
The search starting position.
Returns
The zero-based index position of the first occurrence in this instance where any character in anyOf
was found; -1 if no character in anyOf
was found.
Exceptions
startIndex
is greater than or equal to Length or less than zero.
Applies to
.NET 9 (package-provided) e altre versioni
Prodotto | Versioni |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
- Source:
- StringSegment.cs
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters.
public:
int IndexOfAny(cli::array <char> ^ anyOf);
public int IndexOfAny (char[] anyOf);
member this.IndexOfAny : char[] -> int
Public Function IndexOfAny (anyOf As Char()) As Integer
Parameters
- anyOf
- Char[]
A Unicode character array containing one or more characters to seek.
Returns
The zero-based index position of the first occurrence in this instance where any character in anyOf
was found; -1 if no character in anyOf
was found.
Applies to
.NET 9 (package-provided) e altre versioni
Prodotto | Versioni |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: