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

◆ TryParse() [8/16]

static bool System.Buffers.Text.Utf8Parser.TryParse ( ReadOnlySpan< byte > source,
out Guid value,
out int bytesConsumed,
char standardFormat = '\0' )
inlinestatic

Definition at line 1109 of file Utf8Parser.cs.

1110 {
1111 while (true)
1112 {
1113 switch (standardFormat)
1114 {
1115 case '\0':
1116 return TryParseGuidCore(source, out value, out bytesConsumed, 0);
1117 case 'D':
1118 break;
1119 case 'B':
1120 return TryParseGuidCore(source, out value, out bytesConsumed, 32123);
1121 case 'P':
1122 return TryParseGuidCore(source, out value, out bytesConsumed, 10536);
1123 case 'N':
1124 return TryParseGuidN(source, out value, out bytesConsumed);
1125 default:
1126 return ParserHelpers.TryParseThrowFormatException<Guid>(source, out value, out bytesConsumed);
1127 }
1128 standardFormat = '\0';
1129 }
1130 }
static bool TryParseGuidN(ReadOnlySpan< byte > text, out Guid value, out int bytesConsumed)
static bool TryParseGuidCore(ReadOnlySpan< byte > source, out Guid value, out int bytesConsumed, int ends)

References System.source, System.Buffers.Text.Utf8Parser.TryParseGuidCore(), System.Buffers.Text.Utf8Parser.TryParseGuidN(), System.Buffers.Text.ParserHelpers.TryParseThrowFormatException(), and System.value.