[FR] StringArray::getLast()

It would be convenient to also have getLast() and getFirst() in the StringArray.

1 Like

and a swap function also

void swap (int index1, int index2) noexcept
{
    std::swap (getReference (index1), getReference (index2));
}

Hi samuel,

The Array holding the actual strings is public in StringArray so you can call these methods directly on that object.

Ed

wow, I never noticed that! :blush:

Me neither! Thanks for pointing that out @ed95

    /** This is the array holding the actual strings. This is public to allow direct access
    to array methods that may not already be provided by the StringArray class.
*/
Array<String> strings;
2 Likes