Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ParserHelpers.cs
Go to the documentation of this file.
5
6namespace System.Buffers.Text;
7
8internal static class ParserHelpers
9{
10 [MethodImpl(MethodImplOptions.AggressiveInlining)]
11 public static bool IsDigit(int i)
12 {
13 return (uint)(i - 48) <= 9u;
14 }
15
16 public static bool TryParseThrowFormatException(out int bytesConsumed)
17 {
18 bytesConsumed = 0;
20 return false;
21 }
22
23 public static bool TryParseThrowFormatException<T>(out T value, out int bytesConsumed) where T : struct
24 {
25 value = default(T);
26 return TryParseThrowFormatException(out bytesConsumed);
27 }
28
29 [DoesNotReturn]
30 [StackTraceHidden]
31 public static bool TryParseThrowFormatException<T>(ReadOnlySpan<byte> source, out T value, out int bytesConsumed) where T : struct
32 {
33 Unsafe.SkipInit<T>(out value);
34 Unsafe.SkipInit<int>(out bytesConsumed);
36 return false;
37 }
38}
static bool TryParseThrowFormatException(out int bytesConsumed)
static bool TryParseThrowFormatException< T >(out T value, out int bytesConsumed)
static void ThrowFormatException_BadFormatSpecifier()