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

◆ GetMaxCharCount()

override int System.Text.GB18030Encoding.GetMaxCharCount ( int byteCount)
inline

Definition at line 552 of file GB18030Encoding.cs.

553 {
554 if (byteCount < 0)
555 {
556 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_NeedNonNegNum);
557 }
558 long num = (long)byteCount + 3L;
559 if (base.DecoderFallback.MaxCharCount > 1)
560 {
561 num *= base.DecoderFallback.MaxCharCount;
562 }
563 if (num > int.MaxValue)
564 {
565 throw new ArgumentOutOfRangeException("byteCount", System.SR.ArgumentOutOfRange_GetCharCountOverflow);
566 }
567 return (int)num;
568 }
static string ArgumentOutOfRange_GetCharCountOverflow
Definition SR.cs:90
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7

References System.SR.ArgumentOutOfRange_GetCharCountOverflow, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.byteCount, and System.L.