| 295 | }; |
| 296 | |
| 297 | class StringList : public List<String> { |
| 298 | public: |
| 299 | typedef List<String> Base; |
| 300 | |
| 301 | typedef Base::iterator iterator; |
| 302 | typedef Base::const_iterator const_iterator; |
| 303 | typedef Base::value_type value_type; |
| 304 | typedef Base::reference reference; |
| 305 | typedef Base::const_reference const_reference; |
| 306 | |
| 307 | template <typename Container> |
| 308 | static StringList from(Container const& m); |
| 309 | |
| 310 | StringList(); |
| 311 | StringList(Base const& l); |
| 312 | StringList(Base&& l); |
| 313 | StringList(StringList const& l); |
| 314 | StringList(StringList&& l); |
| 315 | StringList(size_t len, String::Char const* const* list); |
| 316 | StringList(size_t len, char const* const* list); |
| 317 | explicit StringList(size_t len, String const& s1 = String()); |
| 318 | StringList(std::initializer_list<String> list); |
| 319 | |
| 320 | template <typename InputIterator> |
| 321 | StringList(InputIterator beg, InputIterator end) |
| 322 | : Base(beg, end) {} |
| 323 | |
| 324 | StringList& operator=(Base const& rhs); |
| 325 | StringList& operator=(Base&& rhs); |
| 326 | StringList& operator=(StringList const& rhs); |
| 327 | StringList& operator=(StringList&& rhs); |
| 328 | StringList& operator=(initializer_list<String> list); |
| 329 | |
| 330 | bool contains(String const& s, String::CaseSensitivity cs = String::CaseSensitive) const; |
| 331 | StringList trimAll(String const& chars = "") const; |
| 332 | String join(String const& separator = "") const; |
| 333 | |
| 334 | StringList slice(SliceIndex a = SliceIndex(), SliceIndex b = SliceIndex(), int i = 1) const; |
| 335 | |
| 336 | template <typename Filter> |
| 337 | StringList filtered(Filter&& filter) const; |
| 338 | |
| 339 | template <typename Comparator> |
| 340 | StringList sorted(Comparator&& comparator) const; |
| 341 | |
| 342 | StringList sorted() const; |
| 343 | }; |
| 344 | |
| 345 | std::ostream& operator<<(std::ostream& os, StringList const& list); |
| 346 | |