Luna::BasicString::resize

void resize(usize n, value_type v)

Resizes the string.

Parameters

  • in n

    The new size of the string.

If n is greater than size, n - size() copied of v will be inserted to the back of the string.

If n is smaller than size, size() - n characters will be removed from the back of the string.

If n is equal to size, this function does nothing.

Parameters

  • in v

    The character to insert if n is greater than size.