Base64.GetMaxEncodedToUtf8Length(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the maximum length (in bytes) of the result if you were to encode binary data within a byte span with the specified length.
public:
static int GetMaxEncodedToUtf8Length(int length);
public static int GetMaxEncodedToUtf8Length (int length);
static member GetMaxEncodedToUtf8Length : int -> int
Public Shared Function GetMaxEncodedToUtf8Length (length As Integer) As Integer
Parameters
- length
- Int32
The size of the byte span.
Returns
The maximum length (in bytes) of the result.
Exceptions
length
is less than 0 or larger than 1610612733 (since encode inflates the data by 4/3).
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.