51 template <
typename... OtherElements>
53 :
strings (firstValue, std::forward<OtherElements> (otherValues)...) {}
56 StringArray (
const std::initializer_list<const char*>& strings);
62 template <typename Type>
65 addArray (stringArray.begin(), stringArray.end());
79 StringArray (
const char*
const* strings,
int numberOfStrings);
92 explicit StringArray (
const wchar_t*
const* strings);
99 StringArray (
const wchar_t*
const* strings,
int numberOfStrings);
111 template <typename Type>
114 addArray (stringArray.begin(), stringArray.end());
126 bool operator== (
const StringArray&)
const noexcept;
132 bool operator!= (
const StringArray&)
const noexcept;
148 const String& operator[] (
int index)
const noexcept;
154 String& getReference (
int index)
noexcept;
160 const String& getReference (
int index)
const noexcept;
189 bool contains (
StringRef stringToLookFor,
190 bool ignoreCase =
false)
const;
203 bool ignoreCase =
false,
204 int startIndex = 0)
const;
208 void add (
String stringToAdd);
217 void insert (
int index,
String stringToAdd);
224 bool addIfNotAlreadyThere (
const String& stringToAdd,
bool ignoreCase =
false);
231 void set (
int index,
String newString);
242 int numElementsToAdd = -1);
247 template <
typename Iterator>
263 bool ignoreCase =
false);
272 int addTokens (
StringRef stringToTokenise,
bool preserveQuotedStrings);
288 int addTokens (
StringRef stringToTokenise,
298 int addLines (
StringRef stringToBreakUp);
307 bool preserveQuotedStrings);
346 void remove (
int index);
352 void removeString (
StringRef stringToRemove,
353 bool ignoreCase =
false);
366 void removeRange (
int startIndex,
int numberToRemove);
375 void removeDuplicates (
bool ignoreCase);
381 void removeEmptyStrings (
bool removeWhitespaceStrings =
true);
397 void move (
int currentIndex,
int newIndex)
noexcept;
417 void appendNumbersToDuplicates (
bool ignoreCaseWhenComparing,
418 bool appendNumberToFirstInstance,
437 int numberOfElements = -1)
const;
443 void sort (
bool ignoreCase);
458 void ensureStorageAllocated (
int minNumElements);
466 void minimiseStorageOverheads();
void addArray(const StringArray &other, int startIndex=0, int numElementsToAdd=-1)
StringArray(StringRef firstValue, OtherElements &&... otherValues)
const String * begin() const noexcept
void addArray(Iterator &&start, Iterator &&end)
int size() const noexcept
const String * end() const noexcept
bool isEmpty() const noexcept
void ensureStorageAllocated(int minNumElements)
String * begin() noexcept