StringSegment.IndexOf Method
Definition
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.
Overloads
IndexOf(Char, Int32, Int32) |
Gets the zero-based index of the first occurrence of the character |
IndexOf(Char) |
Gets the zero-based index of the first occurrence of the character |
IndexOf(Char, Int32) |
Gets the zero-based index of the first occurrence of the character |
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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기