ByteArrayExtensions Class

Summary

Extensions for working with byte arrays.
Assembly
Cake.Issues.dll
Namespace
Cake.Issues
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["ByteArrayExtensions"] class Type type-node

Syntax

public static class ByteArrayExtensions

Methods

Name Value Summary
RemovePreamble(byte[], Encoding) byte[]
Removes the preamble from a byte array.
static
RemovePreamble(byte[]) byte[]
Removes the BOM of a UTF-8 encoded byte array.
static
ToByteArray(string, Encoding) byte[]
Converts a string to a byte array using a specific encoding.
static
ToByteArray(string) byte[]
Converts a string to a byte array using UTF-8 encoding.
static
ToStringUsingEncoding(byte[], bool) string
Converts a byte array of a UTF-8 encoded string to a string.
static
ToStringUsingEncoding(byte[], Encoding, bool) string
Converts a byte array to a string.
static
ToStringUsingEncoding(byte[]) string
Converts a byte array of a UTF-8 encoded string to a string.
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin