Пример #1
0
 /// <summary>
 /// Writes a <paramref name="value"/> into <paramref name="destination"/> and then 'advances'.
 /// </summary>
 /// <exception cref="IndexOutOfRangeException">Thrown if the <paramref name="value"/> does not fit into the <paramref name="destination"/>.</exception>
 public static void WriteUTF8(this IHFormat format, ref Span <byte> destination, ReadOnlySpan <char> value)
 {
     format.WriteUTF8(destination, value, out int bytesWritten);
     destination = destination.Slice(bytesWritten);
 }