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

◆ DecodeUtf8()

static unsafe string System.Reflection.Internal.EncodingHelper.DecodeUtf8 ( byte * bytes,
int byteCount,
byte?[] prefix,
MetadataStringDecoder utf8Decoder )
inlinestatic

Definition at line 20 of file EncodingHelper.cs.

21 {
22 if (prefix != null)
23 {
24 return DecodeUtf8Prefixed(bytes, byteCount, prefix, utf8Decoder);
25 }
26 if (byteCount == 0)
27 {
28 return string.Empty;
29 }
30 return utf8Decoder.GetString(bytes, byteCount);
31 }
static unsafe string DecodeUtf8Prefixed(byte *bytes, int byteCount, byte[] prefix, MetadataStringDecoder utf8Decoder)
virtual unsafe string GetString(byte *bytes, int byteCount)

References System.byteCount, System.bytes, System.Reflection.Internal.EncodingHelper.DecodeUtf8Prefixed(), System.Reflection.Metadata.MetadataStringDecoder.GetString(), and System.prefix.

Referenced by System.Reflection.Internal.MemoryBlock.PeekUtf8NullTerminated().