Sign.opIndexAssign

Sets the text at the given line.

  1. void opIndexAssign(string[4] texts)
  2. void opIndexAssign(string text)
  3. void opIndexAssign(string text, size_t index)
    class Sign
    void
    opIndexAssign
    (
    string text
    ,
    size_t index
    )

Parameters

text string

the new text for the given line

index size_t

the line to place the text into

Throws

RangeError if index is not on the range 0..4

Examples

string text = "New text for line 2";
sign[Sign.SECOND_LINE] = text;
assert(sign[Sign.SECOND_LINE] == text);

Meta