RCString.this

Constructs a qualified rcstring out of a number of bytes that will use the provided allocator object. For immutable objects, a RCISharedAllocator must be supplied. If no allocator is passed, the default allocator will be used.

Parameters

bytes ubyte[]

a variable number of bytes, either in the form of a list or as a built-in RCString

Complexity: O(m), where m is the number of bytes.

Examples

// Create a list from a list of bytes
auto a = RCString('1', '2', '3');

// Create a list from an array of bytes
auto b = RCString(['1', '2', '3']);

// Create a const list from a list of bytes
auto c = const RCString('1', '2', '3');
import std.experimental.allocator : theAllocator, processAllocator;

// Create a list from a list of ints
auto a = RCString(theAllocator, '1', '2', '3');

// Create a list from an array of ints
auto b = RCString(theAllocator, ['1', '2', '3']);

Meta