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

◆ SubstringByTextElements() [2/2]

string System.Globalization.StringInfo.SubstringByTextElements ( int startingTextElement,
int lengthInTextElements )
inline

Definition at line 82 of file StringInfo.cs.

83 {
84 int[] array = Indexes ?? Array.Empty<int>();
85 if ((uint)startingTextElement >= (uint)array.Length)
86 {
87 throw new ArgumentOutOfRangeException("startingTextElement", startingTextElement, SR.Arg_ArgumentOutOfRangeException);
88 }
89 if ((uint)lengthInTextElements > (uint)(array.Length - startingTextElement))
90 {
91 throw new ArgumentOutOfRangeException("lengthInTextElements", lengthInTextElements, SR.Arg_ArgumentOutOfRangeException);
92 }
93 int num = array[startingTextElement];
94 Index end = ^0;
95 if ((uint)(startingTextElement + lengthInTextElements) < (uint)array.Length)
96 {
98 }
99 return String[num..end];
100 }

References System.SR.Arg_ArgumentOutOfRangeException, System.array, and System.Globalization.StringInfo.Indexes.