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

◆ GetStringForSmallInput()

unsafe string System.Text.UTF8Encoding.UTF8EncodingSealed.GetStringForSmallInput ( byte[] bytes)
inlineprivate

Definition at line 68 of file UTF8Encoding.cs.

69 {
70 char* ptr = stackalloc char[32];
71 int byteCount = bytes.Length;
72 int charsCommon;
73 fixed (byte* pBytes = bytes)
74 {
75 charsCommon = GetCharsCommon(pBytes, byteCount, ptr, 32);
76 }
77 return new string(new ReadOnlySpan<char>(ref *ptr, charsCommon));
78 }
unsafe int GetCharsCommon(byte *pBytes, int byteCount, char *pChars, int charCount)

References System.byteCount, System.bytes, and System.Text.UTF8Encoding.GetCharsCommon().

Referenced by System.Text.UTF8Encoding.UTF8EncodingSealed.GetString().