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

◆ GetCharCount() [4/5]

unsafe override int System.Text.UTF32Encoding.GetCharCount ( byte[] bytes,
int index,
int count )
inline

Definition at line 222 of file UTF32Encoding.cs.

223 {
224 if (bytes == null)
225 {
226 throw new ArgumentNullException("bytes", SR.ArgumentNull_Array);
227 }
228 if (index < 0 || count < 0)
229 {
230 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
231 }
232 if (bytes.Length - index < count)
233 {
234 throw new ArgumentOutOfRangeException("bytes", SR.ArgumentOutOfRange_IndexCountBuffer);
235 }
236 if (count == 0)
237 {
238 return 0;
239 }
240 fixed (byte* ptr = bytes)
241 {
242 return GetCharCount(ptr + index, count, null);
243 }
244 }
unsafe override int GetCharCount(byte[] bytes, int index, int count)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.bytes, System.count, System.Text.UTF32Encoding.GetCharCount(), and System.index.

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