Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IndexOf() [3/10]

int System.String.IndexOf ( char value,
int startIndex,
int count )
inline

Definition at line 3257 of file String.cs.

3258 {
3259 if ((uint)startIndex > (uint)Length)
3260 {
3261 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_Index);
3262 }
3263 if ((uint)count > (uint)(Length - startIndex))
3264 {
3265 throw new ArgumentOutOfRangeException("count", SR.ArgumentOutOfRange_Count);
3266 }
3267 int num = SpanHelpers.IndexOf(ref Unsafe.Add(ref _firstChar, startIndex), value, count);
3268 if (num != -1)
3269 {
3270 return num + startIndex;
3271 }
3272 return num;
3273 }
char _firstChar
Definition String.cs:35

References System.String._firstChar, System.SR.ArgumentOutOfRange_Count, System.SR.ArgumentOutOfRange_Index, System.count, System.SpanHelpers.IndexOf(), System.String.Length, System.startIndex, and System.value.