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

◆ TryWriteBytes() [1/3]

static bool System.Text.Encodings.Web.SpanUtility.TryWriteBytes ( Span< byte > span,
byte a,
byte b,
byte c,
byte d )
inlinestatic

Definition at line 30 of file SpanUtility.cs.

31 {
32 if (span.Length >= 4)
33 {
34 Unsafe.WriteUnaligned(value: (uint)((!BitConverter.IsLittleEndian) ? ((a << 24) | (b << 16) | (c << 8) | d) : ((d << 24) | (c << 16) | (b << 8) | a)), destination: ref MemoryMarshal.GetReference(span));
35 return true;
36 }
37 return false;
38 }
int Length
Definition Span.cs:70

References System.destination, System.BitConverter.IsLittleEndian, System.Span< T >.Length, and System.Text.Encodings.Web.value.

Referenced by System.Text.Encodings.Web.DefaultHtmlEncoder.EscaperImplementation.EncodeUtf8().