Method ExtString.IndexOf(+ 3 overloads)
Overload
Finds character c in this span, starting from index.
public static int IndexOf(this ReadOnlySpan<char> t, int index, char c)
Parameters
t (ReadOnlySpan<char>) |
index (int) |
c (char) |
Returns
int
Character index in this span, or -1 if not found. |
Exceptions
Overload(next)
Finds character c in range of this span.
public static int IndexOf(this ReadOnlySpan<char> t, Range range, char c)
Parameters
t (ReadOnlySpan<char>) |
range (Range) |
c (char) |
Returns
int
Character index in this span, or -1 if not found. |
Exceptions
Overload(next)
Finds string s in this span, starting from index.
public static int IndexOf(this ReadOnlySpan<char> t, int index, ReadOnlySpan<char> s, bool ignoreCase = false)
Parameters
t (ReadOnlySpan<char>) |
index (int) |
s (ReadOnlySpan<char>) |
ignoreCase (bool) |
Returns
int
Character index in this span, or -1 if not found. |
Exceptions
ArgumentOutOfRangeException |
ArgumentNullException
s is |
Overload(top)
Finds string s in range of this span.
public static int IndexOf(this ReadOnlySpan<char> t, Range range, ReadOnlySpan<char> s, bool ignoreCase = false)
Parameters
t (ReadOnlySpan<char>) |
range (Range) |
s (ReadOnlySpan<char>) |
ignoreCase (bool) |
Returns
int
Character index in this span, or -1 if not found. |
Exceptions
ArgumentOutOfRangeException |
ArgumentNullException
s is |