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

◆ IndexOf() [16/16]

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

Definition at line 670 of file CompareInfo.cs.

671 {
672 if (source == null)
673 {
674 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
675 }
676 if (value == null)
677 {
678 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
679 }
680 if (!source.TryGetSpan(startIndex, count, out var slice))
681 {
682 if ((uint)startIndex > (uint)source.Length)
683 {
684 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
685 }
686 else
687 {
688 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_Count);
689 }
690 }
691 int num = IndexOf(slice, value, options);
692 if (num >= 0)
693 {
694 num += startIndex;
695 }
696 return num;
697 }
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.