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

◆ GetByteCount() [4/7]

unsafe override int System.Text.UTF32Encoding.GetByteCount ( char[] chars,
int index,
int count )
inline

Definition at line 98 of file UTF32Encoding.cs.

99 {
100 if (chars == null)
101 {
102 throw new ArgumentNullException("chars", SR.ArgumentNull_Array);
103 }
104 if (index < 0 || count < 0)
105 {
106 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
107 }
108 if (chars.Length - index < count)
109 {
110 throw new ArgumentOutOfRangeException("chars", SR.ArgumentOutOfRange_IndexCountBuffer);
111 }
112 if (count == 0)
113 {
114 return 0;
115 }
116 fixed (char* ptr = chars)
117 {
118 return GetByteCount(ptr + index, count, null);
119 }
120 }
unsafe override int GetByteCount(char[] chars, int index, int count)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.chars, System.count, System.Text.UTF32Encoding.GetByteCount(), and System.index.

Referenced by System.Text.UTF32Encoding.GetByteCount(), System.Text.UTF32Encoding.GetByteCount(), and System.Text.UTF32Encoding.GetByteCount().