Hi, On 15.12.2011 07:46, clemens.zeidler@xxxxxxxxxxxxxx wrote:
@@ -25,6 +26,8 @@ public: bool Remove(const BString& string, bool ignoreCase = false); + void Remove(const BStringList& list, + bool ignoreCase = false);
Additionally to what Ingo said, the added version of Remove() could also return bool for consistency, see below...
@@ -126,6 +127,14 @@ BStringList::Remove(const BString& string, bool ignoreCase) } +void +BStringList::Remove(const BStringList& list, bool ignoreCase) +{ + for (int32 i = 0; i< list.CountStrings(); i++) + Remove(list.StringAt(i), ignoreCase); +}
An implementation which returns bool could look like this: bool removedAnything = false; for (int32 i = list.CountStrings() - 1; i >= 0; i--) { removedAnything = Remove(list.StringAt(i), ignoreCase) || removedAnything; } return removedAnything; Best regards, -Stephan