OpenZWave Library 1.2
Utils.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2//
3// Utils.h
4//
5// Miscellaneous helper functions
6//
7// Copyright (c) 2010 Mal Lansell <openzwave@lansell.org>
8//
9// SOFTWARE NOTICE AND LICENSE
10//
11// This file is part of OpenZWave.
12//
13// OpenZWave is free software: you can redistribute it and/or modify
14// it under the terms of the GNU Lesser General Public License as published
15// by the Free Software Foundation, either version 3 of the License,
16// or (at your option) any later version.
17//
18// OpenZWave is distributed in the hope that it will be useful,
19// but WITHOUT ANY WARRANTY; without even the implied warranty of
20// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21// GNU Lesser General Public License for more details.
22//
23// You should have received a copy of the GNU Lesser General Public License
24// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
25//
26//-----------------------------------------------------------------------------
27
28#ifndef _Utils_H
29#define _Utils_H
30
31#include <string>
32#include <locale>
33#include <algorithm>
34#include <sstream>
35#include <vector>
36
37namespace OpenZWave
38{
45 string ToUpper( string const& _str );
46
53 string ToLower( string const& _str );
54
62 void split (std::vector<std::string>& lst, const std::string& input, const std::string& separators, bool remove_empty = true);
63
69 std::string &trim ( std::string &s );
70
71} // namespace OpenZWave
72
73#endif
74
75
76
#define s(x, c)
Definition: aesopt.h:483
Definition: Bitfield.h:35
void split(std::vector< std::string > &lst, const std::string &input, const std::string &separators, bool remove_empty=true)
Definition: Utils.cpp:95
string ToUpper(string const &_str)
Definition: Utils.cpp:39
std::string & trim(std::string &s)
Definition: Utils.cpp:68
string ToLower(string const &_str)
Definition: Utils.cpp:53