13 #include <OpenMS/OpenMSConfig.h>
32 typedef std::vector<String>::iterator
Iterator;
149 struct TrimmableStringPredicate_
151 TrimmableStringPredicate_(
const String& target,
const bool trim) :
155 if (trim_) target_.trim();
180 struct PrefixPredicate_ :
181 TrimmableStringPredicate_
183 PrefixPredicate_(
const String& target,
const bool trim) :
184 TrimmableStringPredicate_(target,
trim)
193 inline bool operator()(
const String& value)
195 return getValue(value).hasPrefix(target_);
201 struct SuffixPredicate_ :
202 TrimmableStringPredicate_
204 SuffixPredicate_(
const String& target,
const bool trim) :
205 TrimmableStringPredicate_(target,
trim)
214 inline bool operator()(
const String& value)
216 return getValue(value).hasSuffix(target_);
Utilities operating on lists of Strings.
Definition: StringListUtils.h:26
static void toLower(StringList &sl)
Transforms all strings contained in the passed StringList to lower case.
static Iterator searchPrefix(const Iterator &start, const Iterator &end, const String &text, bool trim=false)
Searches for the first line that starts with text beginning at line start.
std::vector< String >::reverse_iterator ReverseIterator
Mutable reverse iterator.
Definition: StringListUtils.h:36
StringListUtils & operator=(StringListUtils &)
Definition: StringListUtils.h:225
std::vector< String >::const_iterator ConstIterator
Non-mutable iterator.
Definition: StringListUtils.h:34
static Iterator searchSuffix(const Iterator &start, const Iterator &end, const String &text, bool trim=false)
Searches for the first line that ends with text beginning at line start.
static ConstIterator searchSuffix(const StringList &container, const String &text, bool trim=false)
Searches for the first line that ends with text in the StringList container.
static void toUpper(StringList &sl)
Transforms all strings contained in the passed StringList to upper case.
static Iterator searchPrefix(StringList &container, const String &text, bool trim=false)
Searches for the first line that starts with text in the StringList container.
std::vector< String >::const_reverse_iterator ConstReverseIterator
Non-mutable reverse iterator.
Definition: StringListUtils.h:38
static Iterator searchSuffix(StringList &container, const String &text, bool trim=false)
Searches for the first line that ends with text in the StringList container.
static ConstIterator searchPrefix(const StringList &container, const String &text, bool trim=false)
Searches for the first line that starts with text in the StringList container.
static ConstIterator searchSuffix(const ConstIterator &start, const ConstIterator &end, const String &text, bool trim=false)
Searches for the first line that ends with text beginning at line start.
INTERNAL StringListUtils()
hide c'tors to avoid instantiation of utils class
Definition: StringListUtils.h:223
StringListUtils(const StringListUtils &)
Definition: StringListUtils.h:224
std::vector< String >::iterator Iterator
Mutable iterator.
Definition: StringListUtils.h:32
static StringList fromQStringList(const QStringList &rhs)
Creates a StringList from a QStringList.
static ConstIterator searchPrefix(const ConstIterator &start, const ConstIterator &end, const String &text, bool trim=false)
Searches for the first line that starts with text beginning at line start.
A more convenient string class.
Definition: String.h:34
String & trim()
removes whitespaces (space, tab, line feed, carriage return) at the beginning and the end of the stri...
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:44
static String & trim(String &this_s)
Definition: StringUtilsSimple.h:204
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19