다음을 통해 공유


StringSegment.IndexOf Method

Definition

Overloads

IndexOf(Char, Int32, Int32)

Gets the zero-based index of the first occurrence of the character c in this StringSegment. The search starts at start and examines a specified number of count character positions.

IndexOf(Char)

Gets the zero-based index of the first occurrence of the character c in this StringSegment.

IndexOf(Char, Int32)

Gets the zero-based index of the first occurrence of the character c in this StringSegment. The search starts at start.

IndexOf(Char, Int32, Int32)

Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs

Gets the zero-based index of the first occurrence of the character c in this StringSegment. The search starts at start and examines a specified number of count character positions.

public:
 int IndexOf(char c, int start, int count);
public int IndexOf (char c, int start, int count);
member this.IndexOf : char * int * int -> int
Public Function IndexOf (c As Char, start As Integer, count As Integer) As Integer

Parameters

c
Char

The Unicode character to seek.

start
Int32

The zero-based index position at which the search starts.

count
Int32

The number of characters to examine.

Returns

The zero-based index position of c from the beginning of the StringSegment if that character is found, or -1 if it is not.

Exceptions

start or count is less than zero, or start + count is greater than Length.

Applies to

IndexOf(Char)

Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs

Gets the zero-based index of the first occurrence of the character c in this StringSegment.

public:
 int IndexOf(char c);
public int IndexOf (char c);
member this.IndexOf : char -> int
Public Function IndexOf (c As Char) As Integer

Parameters

c
Char

The Unicode character to seek.

Returns

The zero-based index position of c from the beginning of the StringSegment if that character is found, or -1 if it is not.

Applies to

IndexOf(Char, Int32)

Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs
Source:
StringSegment.cs

Gets the zero-based index of the first occurrence of the character c in this StringSegment. The search starts at start.

public:
 int IndexOf(char c, int start);
public int IndexOf (char c, int start);
member this.IndexOf : char * int -> int
Public Function IndexOf (c As Char, start As Integer) As Integer

Parameters

c
Char

The Unicode character to seek.

start
Int32

The zero-based index position at which the search starts.

Returns

The zero-based index position of c from the beginning of the StringSegment if that character is found, or -1 if it is not.

Exceptions

start is greater than or equal to Length or less than zero.

Applies to