public static bool TryParseUInt16(ReadOnlySpan <char> text, out ushort value) { int consumed; var byteSpan = text.Cast <char, byte>(); return(PrimitiveParser.TryParseUInt16(byteSpan, out value, out consumed, EncodingData.InvariantUtf16, 'X')); }
public unsafe static bool TryParseUInt16(char *text, int length, out ushort value) { int consumed; var span = new ReadOnlySpan <byte>(text, length * sizeof(char)); return(PrimitiveParser.TryParseUInt16(span, out value, out consumed, EncodingData.InvariantUtf16, 'X')); }
public static bool TryParseUInt16(ReadOnlySpan <char> text, out ushort value, out int charactersConsumed) { var byteSpan = text.Cast <char, byte>(); int bytesConsumed; bool result = PrimitiveParser.TryParseUInt16(byteSpan, out value, out bytesConsumed, EncodingData.InvariantUtf16, 'X'); charactersConsumed = bytesConsumed / sizeof(char); return(result); }
public unsafe static bool TryParseUInt16(char *text, int length, out ushort value, out int charactersConsumed) { var span = new ReadOnlySpan <byte>(text, length * sizeof(char)); int bytesConsumed; bool result = PrimitiveParser.TryParseUInt16(span, out value, out bytesConsumed, EncodingData.InvariantUtf16, 'X'); charactersConsumed = bytesConsumed / sizeof(char); return(result); }
public static bool TryParseUInt16(ReadOnlySpan <byte> text, out ushort value, out int bytesConsumed) { return(PrimitiveParser.TryParseUInt16(text, out value, out bytesConsumed, EncodingData.InvariantUtf8, 'X')); }
public unsafe static bool TryParseUInt16(byte *text, int length, out ushort value, out int bytesConsumed) { var span = new ReadOnlySpan <byte>(text, length); return(PrimitiveParser.TryParseUInt16(span, out value, out bytesConsumed, EncodingData.InvariantUtf8, 'X')); }
public static bool TryParseUInt16(ReadOnlySpan <byte> text, out ushort value) { int consumed; return(PrimitiveParser.TryParseUInt16(text, out value, out consumed, EncodingData.InvariantUtf8)); }