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

◆ GetCharCount() [4/5]

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

Definition at line 369 of file UTF7Encoding.cs.

370 {
371 if (bytes == null)
372 {
373 throw new ArgumentNullException("bytes", SR.ArgumentNull_Array);
374 }
375 if (index < 0 || count < 0)
376 {
377 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
378 }
379 if (bytes.Length - index < count)
380 {
381 throw new ArgumentOutOfRangeException("bytes", SR.ArgumentOutOfRange_IndexCountBuffer);
382 }
383 if (count == 0)
384 {
385 return 0;
386 }
387 fixed (byte* ptr = bytes)
388 {
389 return GetCharCount(ptr + index, count, null);
390 }
391 }
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.UTF7Encoding.GetCharCount(), and System.index.

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