String.opIndexAssign - multiple declarations
Function String.opIndexAssign
Assigns a value to the character with the index pos.
ref char opIndexAssign
(
const(char) value,
const(ulong) pos
) pure nothrow @nogc @safe;
Parameters
Name | Description |
---|---|
value | Value. |
pos | Position. |
Returns
Assigned value.
Precondition
length > pos
.
Example
auto s = String("alea iacta est.");
s[0] = 'A';
assert(s[0] == 'A');
Function String.opIndexAssign
Slicing assignment.
ByCodeUnit!char opIndexAssign(R)
(
ByCodeUnit!R value
)
if (is(Unqual!R == char));
ByCodeUnit!(char) opIndexAssign
(
const(char) value
) pure nothrow @nogc @safe;
ByCodeUnit!(char) opIndexAssign
(
const(char[]) value
) pure nothrow @nogc @safe;
Parameters
Name | Description |
---|---|
R | char. |
value | Assigned character, range or string. |
Returns
Range over the string.
Precondition
length == value.length
.