Contents

replace(at:withValue:)

Replaces the value at the given index.

Declaration

func replace(at index: Int, withValue value: Any!) -> Bool

Parameters

  • index:

    The index of the value that will be replaced.

  • value:

    The new value.

Return Value

true if successful; otherwise false.

Discussion

If the value is nil or if the index is out of bounds, this method raises an exception.

See Also

Replacing values and labels