EncodingPolyfills static class EncodingPolyfills Documentation Code public static int GetByteCount(this Encoding encoding, ReadOnlySpan<char> chars) public static int GetBytes(this Encoding encoding, string str, Span<byte> bytes) public static int GetBytes(this Encoding encoding, ReadOnlySpan<char> chars, Span<byte> bytes) public static int GetCharCount(this Encoding encoding, ReadOnlySpan<byte> bytes) public static int GetChars(this Encoding encoding, ReadOnlySpan<byte> bytes, Span<char> chars) public static string GetString(this Encoding encoding, ReadOnlySpan<byte> bytes) public static bool TryGetChars(this Encoding encoding, ReadOnlySpan<byte> bytes, Span<char> chars, out int charsWritten)