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

◆ GetChars() [3/6]

unsafe override char[] System.Text.Latin1Encoding.GetChars ( byte[] bytes)
inlinevirtualinherited

Reimplemented from System.Text.Encoding.

Definition at line 305 of file Latin1Encoding.cs.

306 {
307 if (bytes == null)
308 {
309 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.bytes);
310 }
311 if (bytes.Length == 0)
312 {
313 return Array.Empty<char>();
314 }
315 char[] array = new char[bytes.Length];
316 fixed (byte* pBytes = bytes)
317 {
318 fixed (char* pChars = array)
319 {
320 GetCharsCommon(pBytes, bytes.Length, pChars, array.Length);
321 }
322 }
323 return array;
324 }
unsafe int GetCharsCommon(byte *pBytes, int byteCount, char *pChars, int charCount)

References System.array, System.bytes, System.Text.Latin1Encoding.GetCharsCommon(), and System.ThrowHelper.ThrowArgumentNullException().