String.opAssign

Assigns another string.

If that is passed by value, it won't be copied, but moved. This string will take the ownership over that's storage and the allocator.

If that is passed by reference, it will be copied.

  1. String opAssign(S that)
  2. String opAssign(S that)
    struct String
    ref @trusted
    opAssign
    (
    S
    )
    (
    ref S that
    )
    if ()
  3. String opAssign(S that)

Parameters

S

Content type.

that S

The value should be assigned.

Return Value

Type: String

$(D_KEYWORD this).

Examples

auto s = String("Черная, потом пропахшая выть!");
s = String("Как мне тебя не ласкать, не любить?");

Meta