RCString.this

Constructs a qualified rcstring out of an input range 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.

  1. this(A allocator)
  2. this(ubyte[] bytes)
  3. this(A allocator, ubyte[] bytes)
  4. this(string s)
  5. this(dstring s)
  6. this(wstring s)
  7. this(A allocator, R r)
  8. this(R r)
    struct RCString
    this
    (
    this Q
    R
    )
    (
    R r
    )
    if (
    isInputRange!R &&
    isSomeChar!(ElementType!R)
    &&
    !isSomeString!R
    )

Parameters

r R

input range

Complexity: O(n), where n is the number of elemtns of the input range.

Examples

import std.range : take;
import std.utf : byCodeUnit;
auto s = RCString("dlang".byCodeUnit.take(10));
assert(s.equal("dlang"));

Meta