Luna::List::resize

void resize(usize count, const value_type &value)

Changes the number of elements in the list.

Parameters

  • in count

    The new size of the list. If this is larger than size(), new elements will be copy-inserted at the back of the list using the provided value. If this is smaller than size(), elements in range [count, size()) will be removed from the list. If this is equal to size(), this function does nothing.

  • in value

    The value to initialize the new elements with.