Пример #1
0
 public static void ReadUTF8(this IHFormat format, ReadOnlySpan <byte> source, Span <char> destination, out int bytesRead, out int charsWritten)
 {
     if (!format.TryReadUTF8(source, destination, out bytesRead, out charsWritten))
     {
         ThrowHelper.ThrowIndexOutOfRangeException();
     }
 }
Пример #2
0
 public static string ReadUTF8(this IHFormat format, ReadOnlySpan <byte> source, out int bytesRead)
 {
     if (!format.TryReadUTF8(source, out string value, out bytesRead))
     {
         ThrowHelper.ThrowIndexOutOfRangeException();
     }
     return(value);
 }