GENIEGenerator
Loading...
Searching...
No Matches
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 <c.andreopoulos \at cern.ch>
9 University of Liverpool
10
11\created January 12, 2004
12
13\cpright Copyright (c) 2003-2025, 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
24using std::string;
25using std::vector;
26
27namespace genie {
28namespace utils {
29
30namespace 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_
Utilities for string manipulation.
void ReplaceStringInPlace(string &subject, const string &search, const string &replace)
string ToUpper(string input)
string TrimSpaces(string input)
string ToLower(string input)
string FilterString(string filt, string input)
vector< string > Split(string input, string delim)
bool Convert(const vector< std::string > &input, std::vector< T > &v)
string RemoveSuccessiveSpaces(string input)
string IntAsString(int i)
Root of GENIE utility namespaces.
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25