10template<
typename T,
typename CharType>
42 template<
typename InputIterator>
50 explicit TStrings(std::initializer_list<value_type> list)
74 explicit TStrings(
const T& str,
const T& separator =
",")
109 size_t ofs = 0, found = str.find_first_of(separator, ofs);
110 if (found != std::string::npos)
114 base_type::push_back(str.substr(ofs, found - ofs));
120 found = str.find_first_of(separator, ofs);
121 }
while (found != T::npos);
123 if (str.length() > ofs)
125 base_type::push_back(str.substr(ofs, str.length()));
142 for (; i < s.length(); i++)
145 if (s[i] == sep && !d)
163 if (delimiter && s[i] == delimiter)
Counted vector having function names compatible with Borland C++ templates.
Definition TVector.h:398
Counted vector of strings.
Definition TStrings.h:12
TIterator< value_type > iter_type
Iteration type of the template.
Definition TStrings.h:29
TStrings & explode(const T &str, const T &separator)
Splits all entries using the passed separator.
Definition TStrings.h:107
TStrings()=default
Default constructor.
TStrings(std::initializer_list< value_type > list)
Initializer list constructor.
Definition TStrings.h:50
TVector< T > base_type
Base type of this template .
Definition TStrings.h:17
base_type::value_type value_type
Value type contained by this vector template.
Definition TStrings.h:25
TStrings & split(const T &s, CharType sep, CharType delimiter=0)
Appends all split entries. Splits' the passed string using a separator and text delimiter.
Definition TStrings.h:137
TStrings(const base_type &list)
Initializer list constructor.
Definition TStrings.h:57
base_type::size_type size_type
Size type of this template.
Definition TStrings.h:21
const iter_type const_iter_type
Iteration const type of the template.
Definition TStrings.h:33
T join(const T &glue)
Joins all entries using the passed glue.
Definition TStrings.h:84
TStrings(InputIterator first, InputIterator last)
Initializing constructor using an iterator.
Definition TStrings.h:43
TStrings(const T &str, const T &separator=",")
Exploding constructor.
Definition TStrings.h:74
TStrings(size_type sz)
Initializing constructor.
Definition TStrings.h:65
Counted vector having additional methods and operators for ease of usage.
Definition TVector.h:25
base_type::size_type size_type
Size type of this template.
Definition TVector.h:34
T & first()
Gets the first element of the vector.
Definition TVector.h:631
TVector & append(const T &t)
Appends an entry to the vectors items at the end of the vector.
Definition TVector.h:490
base_type::value_type value_type
Value type contained by this vector template.
Definition TVector.h:38
T & last()
Gets the last element of the vector.
Definition TVector.h:292
Definition Application.h:10
TStrings< std::wstring, std::wstring::value_type > wstrings
Vector of std::wstrings with additional functionality.
Definition TStrings.h:197
TStrings< std::string, std::string::value_type > strings
Vector of std::strings with additional functionality.
Definition TStrings.h:193