The first 6 bits are equal to decimal 63, which corresponds to the base-64 digit "/" at the end of the output, and the next 2 bits are padded with zeros to yield decimal 48, which corresponds to the base-64 digit, "w". In this example, the value of the last byte is hexadecimal FF. If an integral number of 3-byte groups does not exist, the remaining bytes are effectively padded with zeros to form a complete group. Those four values correspond to the base-64 digits "A", "A", "E", and "C" at the beginning of the output. The first group consists of the hexadecimal values 00, 01, and 02, which yield four 6-bit values equal to decimal 0, 0, 4, and 2. In this example, there are 85 3-byte groups with one byte remaining. Consequently, each group consists of four 6-bit numbers where each number ranges from decimal 0 to 63. The input is divided into groups of three bytes (24 bits) each. The following example demonstrates the ToBase64String method. Options is not a valid Base64FormattingOptions value. Static member ToBase64String : byte * int * int * Base64FormattingOptions -> string Public Shared Function ToBase64String (inArray As Byte(), offset As Integer, length As Integer, options As Base64FormattingOptions) As String Parameters Public static string ToBase64String (byte inArray, int offset, int length, Base64FormattingOptions options) static member ToBase64String : byte * int * int * Base64FormattingOptions -> string Static System::String ^ ToBase64String(cli::array ^ inArray, int offset, int length, Base64FormattingOptions options) public static string ToBase64String (byte inArray, int offset, int length, Base64FormattingOptions options) Parameters specify the subset as an offset in the input array, the number of elements in the array to convert, and whether to insert line breaks in the return value. You can optionally specify whether to insert line breaks in the return value.Ĭonverts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. ToBase64String(ReadOnlySpan, Base64FormattingOptions)Ĭonverts the 8-bit unsigned integers inside the specified read-only span into their equivalent string representation that is encoded with base-64 digits. You can specify whether to insert line breaks in the return value. ToBase64String(Byte, Base64FormattingOptions)Ĭonverts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. Parameters specify the subset as an offset in the input array, and the number of elements in the array to convert.Ĭonverts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. Parameters specify the subset as an offset in the input array, the number of elements in the array to convert, and whether to insert line breaks in the return value.Ĭonverts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. Overloads ToBase64String(Byte, Int32, Int32, Base64FormattingOptions)Ĭonverts a subset of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits. Converts the value of an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |