<PackageReference Include="System.Memory" Version="4.6.0" />

Utf8Parser

public static class Utf8Parser
Methods to parse common data types to Utf8 strings.
public static bool TryParse(ReadOnlySpan<byte> source, out bool value, out int bytesConsumed, char standardFormat = '')

Parses a Boolean at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out DateTime value, out int bytesConsumed, char standardFormat = '')

Parses a DateTime at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out DateTimeOffset value, out int bytesConsumed, char standardFormat = '')

Parses a DateTimeOffset at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out decimal value, out int bytesConsumed, char standardFormat = '')

Parses a Decimal at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out float value, out int bytesConsumed, char standardFormat = '')

Parses a Single at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out double value, out int bytesConsumed, char standardFormat = '')

Parses a Double at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out Guid value, out int bytesConsumed, char standardFormat = '')

Parses a Guid at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out sbyte value, out int bytesConsumed, char standardFormat = '')

Parses a SByte at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out short value, out int bytesConsumed, char standardFormat = '')

Parses an Int16 at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out int value, out int bytesConsumed, char standardFormat = '')

Parses an Int32 at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out long value, out int bytesConsumed, char standardFormat = '')

Parses an Int64 at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out byte value, out int bytesConsumed, char standardFormat = '')

Parses a Byte at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out ushort value, out int bytesConsumed, char standardFormat = '')

Parses a UInt16 at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out uint value, out int bytesConsumed, char standardFormat = '')

Parses a UInt32 at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out ulong value, out int bytesConsumed, char standardFormat = '')

Parses a UInt64 at the start of a Utf8 string.

public static bool TryParse(ReadOnlySpan<byte> source, out TimeSpan value, out int bytesConsumed, char standardFormat = '')

Parses a TimeSpan at the start of a Utf8 string.