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

◆ GetByteCount() [4/7]

unsafe override int System.Text.UTF8Encoding.GetByteCount ( char[] chars,
int index,
int count )
inlineinherited

Definition at line 140 of file UTF8Encoding.cs.

141 {
142 if (chars == null)
143 {
144 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.chars, ExceptionResource.ArgumentNull_Array);
145 }
146 if ((index | count) < 0)
147 {
148 ThrowHelper.ThrowArgumentOutOfRangeException((index < 0) ? ExceptionArgument.index : ExceptionArgument.count, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
149 }
150 if (chars.Length - index < count)
151 {
152 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.chars, ExceptionResource.ArgumentOutOfRange_IndexCountBuffer);
153 }
154 fixed (char* ptr = chars)
155 {
156 return GetByteCountCommon(ptr + index, count);
157 }
158 }
unsafe int GetByteCountCommon(char *pChars, int charCount)

References System.chars, System.count, System.Text.UTF8Encoding.GetByteCountCommon(), System.index, System.ThrowHelper.ThrowArgumentNullException(), and System.ThrowHelper.ThrowArgumentOutOfRangeException().