TextEncoder
The base class of web encoders.
Gets the maximum number of characters that this encoder can generate for each input code point.
protected TextEncoder()
Initializes a new instance of the TextEncoder class.
Encodes the supplied string and returns the encoded text as a new string.
Encodes the specified string to a TextWriter object.
Encodes a substring and writes it to a TextWriter object.
Encodes characters from an array and writes them to a TextWriter object.
public virtual OperationStatus Encode(ReadOnlySpan<char> source, Span<char> destination, out int charsConsumed, out int charsWritten, bool isFinalBlock = true)
Encodes the supplied characters.
public virtual OperationStatus EncodeUtf8(ReadOnlySpan<byte> utf8Source, Span<byte> utf8Destination, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true)
Encodes the supplied UTF-8 text.
Finds the index of the first character to encode.
Finds the first element in a UTF-8 text input buffer that would be escaped by the current encoder instance.
public abstract bool TryEncodeUnicodeScalar(int unicodeScalar, Char* buffer, int bufferLength, out int numberOfCharactersWritten)
Encodes a Unicode scalar value and writes it to a buffer.
Determines if a given Unicode scalar value will be encoded.