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

◆ IndexOf() [10/16]

int System.Globalization.CompareInfo.IndexOf ( string source,
char value,
int startIndex,
int count,
CompareOptions options )
inline

Definition at line 645 of file CompareInfo.cs.

646 {
647 if (source == null)
648 {
649 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
650 }
651 if (!source.TryGetSpan(startIndex, count, out var slice))
652 {
653 if ((uint)startIndex > (uint)source.Length)
654 {
655 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
656 }
657 else
658 {
659 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_Count);
660 }
661 }
662 int num = IndexOf(slice, MemoryMarshal.CreateReadOnlySpan(ref value, 1), options);
663 if (num >= 0)
664 {
665 num += startIndex;
666 }
667 return num;
668 }
int IndexOf(string source, char value)

References System.count, System.Globalization.CompareInfo.IndexOf(), System.options, System.source, System.startIndex, System.ThrowHelper.ThrowArgumentNullException(), System.ThrowHelper.ThrowArgumentOutOfRangeException(), and System.value.