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

◆ GetByteCount() [4/7]

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

Definition at line 245 of file UTF7Encoding.cs.

246 {
247 if (chars == null)
248 {
249 throw new ArgumentNullException("chars", SR.ArgumentNull_Array);
250 }
251 if (index < 0 || count < 0)
252 {
253 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
254 }
255 if (chars.Length - index < count)
256 {
257 throw new ArgumentOutOfRangeException("chars", SR.ArgumentOutOfRange_IndexCountBuffer);
258 }
259 if (count == 0)
260 {
261 return 0;
262 }
263 fixed (char* ptr = chars)
264 {
265 return GetByteCount(ptr + index, count, null);
266 }
267 }
unsafe override int GetByteCount(char[] chars, int index, int count)

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.chars, System.count, System.Text.UTF7Encoding.GetByteCount(), and System.index.

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