Biorbd
String.h
1 #ifndef BIORBD_UTILS_STRING_H
2 #define BIORBD_UTILS_STRING_H
3 
4 #include <iostream>
5 #include "biorbdConfig.h"
6 
7 namespace biorbd {
8 namespace utils {
12 #ifdef SWIG
13 class BIORBD_API String
14 #else
15 class BIORBD_API String : public std::string
16 #endif
17 {
18 public:
22  String();
23 
28  String(
29  const char *text);
30 
35  String(
36  const biorbd::utils::String& text);
37 
42  String(
43  const std::basic_string<char>& text);
44 
45 #ifndef SWIG
46  String& operator=(
51  const biorbd::utils::String& other);
52 #endif
53 
58  String operator+(
59  unsigned int val);
60 
65  String operator+(
66  int val);
67 
72  String operator+(
73  double val);
74 
79  String operator+(
80  const char* text);
81 
86  String operator()(
87  unsigned int idx) const;
88 
94  String operator()(
95  unsigned int startIdx,
96  unsigned int lastIdx) const;
97 
101  virtual ~String();
102 
103 #ifndef SWIG
104  static biorbd::utils::String tolower(const biorbd::utils::String &str);
110 
115  biorbd::utils::String tolower() const;
116 
122  static biorbd::utils::String toupper(const biorbd::utils::String &str);
123 
128  biorbd::utils::String toupper() const;
129 #endif
130 
136  static biorbd::utils::String to_string(
137  double val);
138 
144  static biorbd::utils::String to_string(
145  float val);
146 
155  static biorbd::utils::String removeTrailing(
156  const biorbd::utils::String& origin,
157  const biorbd::utils::String& trailTag);
158 };
159 
160 }}
161 #ifndef SWIG
162 std::ostream& operator<<(std::ostream& os, const biorbd::utils::String &a);
168 #endif
169 
170 #endif // BIORBD_UTILS_STRING_H
biorbd::utils::String
Wrapper around the std::string class with augmented functionality.
Definition: String.h:17