Belle II Software development
StringUtil.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#ifndef _Belle2_StringUtil_hh
9#define _Belle2_StringUtil_hh
10
11#include <string>
12#include <vector>
13
14namespace Belle2 {
20 typedef std::vector<std::string> StringList;
21
22 struct StringUtil {
23
24 static StringList split(const std::string& str,
25 const char type, size_t max = 0);
26 static std::string join(StringList str_v, const std::string& s,
27 size_t start = 0, size_t end = 0);
28 static std::string replace(const std::string& source,
29 const std::string& pattern,
30 const std::string& placement);
31 static std::string form(const std::string& string, ...);
32 static std::string toupper(const std::string& str);
33 static std::string tolower(const std::string& str);
34 static int atoi(const std::string& str);
35 static double atof(const std::string& str);
36 static long long atoll(const std::string& str);
37 static bool find(const std::string& s, const std::string& str);
38 static bool isdigit(const std::string& s);
39
40 };
41
43};
44
45#endif
Abstract base class for different kinds of events.