AMDiS  0.1
The Adaptive Multi-Dimensional Simulation Toolbox
String.hpp
1 #pragma once
2 
3 #include <algorithm>
4 #include <cctype>
5 #include <locale>
6 #include <string>
7 
8 namespace AMDiS
9 {
11  std::string to_upper(std::string input);
12 
14  std::string to_lower(std::string input);
15 
17  std::string& ltrim(std::string& str);
18 
20  std::string& rtrim(std::string& str);
21 
23  std::string& trim(std::string& str);
24 
26  std::string trim_copy(std::string const& str);
27 
29  void replaceAll(std::string& str, std::string const& from, std::string const& to);
30 
31 } // end namspace AMDiS
void replaceAll(std::string &str, std::string const &from, std::string const &to)
Replace all occurences of substring from with to in source str.
Definition: String.cpp:59
std::string to_lower(std::string input)
convert all characters in a string to upper case
Definition: String.cpp:16
std::string & trim(std::string &str)
trim a string from both sides
Definition: String.cpp:46
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
std::string to_upper(std::string input)
convert all characters in a string to upper case
Definition: String.cpp:8
std::string trim_copy(std::string const &str)
trim a (copy of the) string from both sides
Definition: String.cpp:52
std::string & ltrim(std::string &str)
trim a string from the left
Definition: String.cpp:24
std::string & rtrim(std::string &str)
trim a string from the right
Definition: String.cpp:35