public static bool TryParseInt64(Utf8Span str, out long val) { if (!Utf8Parser.TryParseInt64(str, out val, out var consumed) || consumed != str.Length()) { return(false); } return(true); }
public static long ParseInt64(Utf8Span str) { if (!Utf8Parser.TryParseInt64(str, out var value, out var consumed)) { throw new FormatException(); } if (consumed != str.Length()) { throw new FormatException(); } return(value); }