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

◆ GetByteCount() [1/3]

virtual unsafe int System.Text.Encoder.GetByteCount ( char * chars,
int count,
bool flush )
inlinevirtual

Reimplemented in System.Text.OSEncoder, System.Text.OSEncoder, System.Text.EncoderNLS, System.Text.Encoding.DefaultEncoder, and System.Text.EncoderNLS.

Definition at line 67 of file Encoder.cs.

68 {
69 if (chars == null)
70 {
71 throw new ArgumentNullException("chars", SR.ArgumentNull_Array);
72 }
73 if (count < 0)
74 {
75 throw new ArgumentOutOfRangeException("count", SR.ArgumentOutOfRange_NeedNonNegNum);
76 }
77 char[] array = new char[count];
78 for (int i = 0; i < count; i++)
79 {
80 array[i] = chars[i];
81 }
82 return GetByteCount(array, 0, count, flush);
83 }
int GetByteCount(char[] chars, int index, int count, bool flush)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.array, System.chars, System.count, and System.Text.Encoder.GetByteCount().