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

◆ GetChars() [1/6]

virtual unsafe int System.Text.Encoding.GetChars ( byte * bytes,
int byteCount,
char * chars,
int charCount )
inlinevirtualinherited

Reimplemented in System.Text.ConsoleEncoding, System.Text.ConsoleEncoding, System.Formats.Asn1.SpanBasedEncoding, System.Formats.Asn1.T61Encoding, System.Text.ASCIIEncoding, System.Text.Latin1Encoding, System.Text.UnicodeEncoding, System.Text.UTF32Encoding, System.Text.UTF7Encoding, System.Text.UTF8Encoding, and System.Text.EncodingNLS.

Definition at line 940 of file Encoding.cs.

941 {
942 if (chars == null || bytes == null)
943 {
944 throw new ArgumentNullException((chars == null) ? "chars" : "bytes", SR.ArgumentNull_Array);
945 }
946 if (byteCount < 0 || charCount < 0)
947 {
948 throw new ArgumentOutOfRangeException((byteCount < 0) ? "byteCount" : "charCount", SR.ArgumentOutOfRange_NeedNonNegNum);
949 }
950 byte[] bytes2 = new ReadOnlySpan<byte>(bytes, byteCount).ToArray();
951 char[] array = new char[charCount];
952 int chars2 = GetChars(bytes2, 0, byteCount, array, 0);
953 if (chars2 < charCount)
954 {
956 }
958 return charCount;
959 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
virtual char[] GetChars(byte[] bytes)
Definition Encoding.cs:921

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.array, System.byteCount, System.bytes, System.charCount, System.chars, System.Collections.Generic.Dictionary< TKey, TValue >.CopyTo(), System.Runtime.Serialization.Dictionary, and System.Text.Encoding.GetChars().