Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AsciiByteMap.cs
Go to the documentation of this file.
1
using
System.Runtime.CompilerServices
;
2
3
namespace
System.Text.Encodings.Web
;
4
5
internal
struct
AsciiByteMap
6
{
7
private
unsafe fixed
byte
Buffer
[128];
8
9
internal
unsafe
void
InsertAsciiChar
(
char
key
,
byte
value
)
10
{
11
if
(
key
<
'\u0080'
)
12
{
13
Buffer
[(uint)
key
] =
value
;
14
}
15
}
16
17
[MethodImpl(
MethodImplOptions
.AggressiveInlining)]
18
internal
unsafe readonly
bool
TryLookup
(
Rune
key
, out
byte
value
)
19
{
20
if
(
key
.IsAscii)
21
{
22
byte
b =
Buffer
[(uint)
key
.Value];
23
if
(b != 0)
24
{
25
value
= b;
26
return
true
;
27
}
28
}
29
value
= 0;
30
return
false
;
31
}
32
}
System.Buffer
Definition
Buffer.cs:8
System.Runtime.CompilerServices.MethodImplOptions
MethodImplOptions
Definition
MethodImplOptions.cs:5
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.Text.Encodings.Web.ExceptionArgument.value
@ value
System.Text.Encodings.Web
Definition
AllowedBmpCodePointsBitmap.cs:6
System.ExceptionArgument.key
@ key
System.Text.Encodings.Web.AsciiByteMap.InsertAsciiChar
unsafe void InsertAsciiChar(char key, byte value)
Definition
AsciiByteMap.cs:9
System.Text.Encodings.Web.AsciiByteMap.TryLookup
unsafe readonly bool TryLookup(Rune key, out byte value)
Definition
AsciiByteMap.cs:18
System.Text.Encodings.Web.AsciiByteMap
Definition
AsciiByteMap.cs:6
System.Text.Rune
Definition
Rune.cs:12
source
System.Text.Encodings.Web
System.Text.Encodings.Web
AsciiByteMap.cs
Generated by
1.10.0