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

◆ GetString() [3/4]

unsafe override string System.Text.UTF32Encoding.GetString ( byte[] bytes,
int index,
int count )
inlinevirtual

Reimplemented from System.Text.Encoding.

Definition at line 306 of file UTF32Encoding.cs.

307 {
308 if (bytes == null)
309 {
310 throw new ArgumentNullException("bytes", SR.ArgumentNull_Array);
311 }
312 if (index < 0 || count < 0)
313 {
314 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
315 }
316 if (bytes.Length - index < count)
317 {
318 throw new ArgumentOutOfRangeException("bytes", SR.ArgumentOutOfRange_IndexCountBuffer);
319 }
320 if (count == 0)
321 {
322 return string.Empty;
323 }
324 fixed (byte* ptr = bytes)
325 {
326 return string.CreateStringFromEncoding(ptr + index, count, this);
327 }
328 }

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.bytes, System.count, and System.index.