StringBuilderExtensionAppendBase64(StringBuilder, ReadOnlySpan`1Byte, Base64FormattingOptions) Method

Appends the content of a read-only Byte span as Base64-encoded character sequence to the end of a StringBuilder.

Definition

Namespace: FolkerKinzel.Strings
Assembly: FolkerKinzel.Strings (in FolkerKinzel.Strings.dll) Version: 9.4.0+10a7d4d71aa960998e32ac0ac6c4fcbe4164c917
C#
public static StringBuilder AppendBase64(
	this StringBuilder builder,
	ReadOnlySpan<byte> bytes,
	Base64FormattingOptions options = Base64FormattingOptions.None
)

Parameters

builder  StringBuilder
The StringBuilder to which the characters are appended.
bytes  ReadOnlySpanByte
The read-only Byte span that contains the data.
options  Base64FormattingOptions  (Optional)
An enumeration value that allows specifying whether line breaks should be automatically inserted into the Base64.

Return Value

StringBuilder
A reference to builder after the append operation has completed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type StringBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionbuilder is null.
ArgumentOutOfRangeExceptionIncreasing the capacity of builder would exceed MaxCapacity.

See Also