PdfEncodingExtensions Class
A type that extends IPdfEncoding interface.
- Inheritance:
- System.ObjectPdfEncodingExtensions
Methods
GetBytes(IPdfEncoding, ReadOnlySpan<Char>)
Encodes all the characters in the specified string into a sequence of bytes.
public static byte[] GetBytes(this IPdfEncoding encoding, ReadOnlySpan<char> s)<ExtensionAttribute>
Public Shared Function GetBytes(encoding As IPdfEncoding, s As ReadOnlySpan(Of Char)) As Byte()Parameters
encoding- IPdfEncoding
The encoding.
s- System.ReadOnlySpan<System.Char>
The string containing the characters to encode.
Returns
- System.Byte[]
A byte array containing the results of encoding the specified set of characters.
Exceptions
- System.ArgumentNullException
encoding or s is null.
GetString(IPdfEncoding, Byte[])
Decodes a sequence of bytes from the specified byte array into a string.
public static string GetString(this IPdfEncoding encoding, byte[] bytes)<ExtensionAttribute>
Public Shared Function GetString(encoding As IPdfEncoding, bytes As Byte()) As StringParameters
encoding- IPdfEncoding
The encoding.
bytes- System.Byte[]
The byte array containing the sequence of bytes to decode.
Returns
- System.String
A string that contains the results of decoding the specified sequence of bytes.
Exceptions
- System.ArgumentNullException
encoding or bytes is null.