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

◆ TryParse() [13/16]

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

Definition at line 3755 of file Utf8Parser.cs.

3756 {
3757 switch (standardFormat)
3758 {
3759 case '\0':
3760 case 'T':
3761 case 'c':
3762 case 't':
3763 return TryParseTimeSpanC(source, out value, out bytesConsumed);
3764 case 'G':
3765 return TryParseTimeSpanBigG(source, out value, out bytesConsumed);
3766 case 'g':
3767 return TryParseTimeSpanLittleG(source, out value, out bytesConsumed);
3768 default:
3769 return ParserHelpers.TryParseThrowFormatException<TimeSpan>(out value, out bytesConsumed);
3770 }
3771 }
static bool TryParseTimeSpanC(ReadOnlySpan< byte > source, out TimeSpan value, out int bytesConsumed)
static bool TryParseTimeSpanBigG(ReadOnlySpan< byte > source, out TimeSpan value, out int bytesConsumed)
static bool TryParseTimeSpanLittleG(ReadOnlySpan< byte > source, out TimeSpan value, out int bytesConsumed)

References System.source, System.Buffers.Text.ParserHelpers.TryParseThrowFormatException(), System.Buffers.Text.Utf8Parser.TryParseTimeSpanBigG(), System.Buffers.Text.Utf8Parser.TryParseTimeSpanC(), System.Buffers.Text.Utf8Parser.TryParseTimeSpanLittleG(), and System.value.