LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
qstringwrappers.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <QString>
12 
13 namespace LC
14 {
15 namespace Util
16 {
17  struct QStringTrimmed
18  {
19  QString operator() (const QString& s) const
20  {
21  return s.trimmed ();
22  }
23 
24  QString operator() (QString&& s) const
25  {
26  return s.trimmed ();
27  }
28 
29  QString operator() (QString& s) const
30  {
31  return std::move (s).trimmed ();
32  }
33  };
34 
35  struct QStringToLower
36  {
37  QString operator() (const QString& s) const
38  {
39  return s.toLower ();
40  }
41 
42  QString operator() (QString&& s) const
43  {
44  return s.toLower ();
45  }
46 
47  QString operator() (QString& s) const
48  {
49  return std::move (s).toLower ();
50  }
51  };
52 }
53 }
LC::Util::QStringTrimmed::operator()
QString operator()(const QString &s) const
Definition: qstringwrappers.h:37
LC::Util::QStringToLower::operator()
QString operator()(const QString &s) const
Definition: qstringwrappers.h:49
LC
Definition: constants.h:14