]> git.tdb.fi Git - libs/core.git/blob - source/utils.h
Add a simple grep program
[libs/core.git] / source / utils.h
1 /* $Id$
2
3 This file is part of libmspstrings
4 Copyright © 2006-2007 Mikko Rasa
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_STRINGS_UTILS_H_
9 #define MSP_STRINGS_UTILS_H_
10
11 #include <string>
12 #include <vector>
13
14 namespace Msp {
15
16 int strcasecmp(const std::string &, const std::string &);
17 std::string tolower(const std::string &);
18 std::string toupper(const std::string &);
19 std::vector<std::string> split(const std::string &, const std::string & =" \t\r\n", bool =false);
20 std::vector<std::string> split(const std::string &, char, bool =false);
21 template<typename T>
22 std::string join(const T &, const std::string & =" ");
23 std::string strip(const std::string &);
24
25 } // namespace Msp
26
27 #endif