共用方式為


StringSegment.IndexOfAny Method

Definition

Overloads

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.

IndexOfAny(Char[], Int32, Int32)

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

IndexOfAny(Char[], Int32)

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

IndexOfAny(Char[])

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