[FR] StringArray::getLast()


#1

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


#2

and a swap function also

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

#3

Hi samuel,

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

Ed


#4

wow, I never noticed that! :blush:


#5

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;