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

◆ GetCharCount() [1/4]

virtual unsafe int System.Text.Decoder.GetCharCount ( byte * bytes,
int count,
bool flush )
inlinevirtualinherited

Reimplemented in System.Text.DecoderDBCS, System.Text.DecoderDBCS, System.Text.DecoderNLS, System.Text.Encoding.DefaultDecoder, and System.Text.DecoderNLS.

Definition at line 69 of file Decoder.cs.

70 {
71 if (bytes == null)
72 {
73 throw new ArgumentNullException("bytes", SR.ArgumentNull_Array);
74 }
75 if (count < 0)
76 {
77 throw new ArgumentOutOfRangeException("count", SR.ArgumentOutOfRange_NeedNonNegNum);
78 }
79 byte[] array = new byte[count];
80 for (int i = 0; i < count; i++)
81 {
82 array[i] = bytes[i];
83 }
84 return GetCharCount(array, 0, count);
85 }
int GetCharCount(byte[] bytes, int index, int count)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.array, System.bytes, System.count, and System.Text.Decoder.GetCharCount().