StringUtils.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \namespace genie::utils::str
5 
6 \brief Utilities for string manipulation
7 
8 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11 \created January 12, 2004
12 
13 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _STRING_UTILS_H_
19 #define _STRING_UTILS_H_
20 
21 #include <string>
22 #include <vector>
23 
24 using std::string;
25 using std::vector;
26 
27 namespace genie {
28 namespace utils {
29 
30 namespace str
31 {
32  string TrimSpaces (string input);
33  string IntAsString (int i);
34  vector<string> Split (string input, string delim);
35  string RemoveSuccessiveSpaces (string input);
36  void ReplaceStringInPlace (string& subject, const string& search, const string& replace);
37  string FilterString (string filt, string input);
38  string ToUpper (string input);
39  string ToLower (string input);
40 
41  template<class T>
42  bool Convert( const vector<std::string> & input, std::vector<T> & v ) ;
43 
44 
45 } // str namespace
46 } // utils namespace
47 } // genie namespace
48 
49 #ifndef __CINT__ // don't even try for ROOT 5
50 #include "Framework/Utils/StringUtils.icc"
51 #endif
52 
53 #endif // _STRING_UTILS_H_
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
string delim()
Definition: fcldump.cxx:40
std::string string
Definition: nybbler.cc:12
struct vector vector
static int input(void)
Definition: code.cpp:15695
string ToLower(string input)
Definition: StringUtils.cxx:98
Definition: search.py:1
string IntAsString(int i)
Definition: StringUtils.cxx:29
string RemoveSuccessiveSpaces(string input)
Definition: StringUtils.cxx:52
bool Convert(const vector< std::string > &input, std::vector< T > &v)
string TrimSpaces(string input)
Definition: StringUtils.cxx:18
string FilterString(string filt, string input)
Definition: StringUtils.cxx:79
vector< string > Split(string input, string delim)
Definition: StringUtils.cxx:36
Definition: utils.py:1
string ToUpper(string input)
Definition: StringUtils.cxx:92
static QCString str
void ReplaceStringInPlace(string &subject, const string &search, const string &replace)
Definition: StringUtils.cxx:67