Biorbd
Release_1.13.0
Toggle main menu visibility
Loading...
Searching...
No Matches
String.h
1
#ifndef BIORBD_UTILS_STRING_H
2
#define BIORBD_UTILS_STRING_H
3
4
#include "biorbdConfig.h"
5
6
#include <iostream>
7
8
namespace
BIORBD_NAMESPACE {
9
namespace
utils {
13
#ifdef SWIG
14
class
BIORBD_API
String
15
#else
16
class BIORBD_API
String
:
public
std::string
17
#endif
18
{
19
public
:
23
String
();
24
29
String
(
const
char
* text);
30
35
String
(
const
String
& text);
36
41
String
(
const
std::basic_string<char>& text);
42
43
#ifndef SWIG
49
String
&
operator=
(
const
String
& other);
50
#endif
51
57
String
operator+
(
size_t
val);
58
64
String
operator+
(
int
val);
65
71
String
operator+
(
double
val);
72
78
String
operator+
(
const
char
* text);
79
85
String
operator()
(
size_t
idx)
const
;
86
93
String
operator()
(
size_t
startIdx,
size_t
lastIdx)
const
;
94
98
virtual
~String
();
99
100
#ifndef SWIG
106
static
String
tolower
(
const
String
& str);
107
112
String
tolower
()
const
;
113
119
static
String
toupper
(
const
String
& str);
120
125
String
toupper
()
const
;
126
#endif
127
134
static
String
to_string
(
double
val);
135
142
static
String
to_string
(
float
val);
143
152
static
String
removeTrailing
(
const
String
& origin,
const
String
& trailTag);
153
};
154
155
}
// namespace utils
156
}
// namespace BIORBD_NAMESPACE
157
158
#ifndef SWIG
164
std::ostream& operator<<(
165
std::ostream& os,
166
const
BIORBD_NAMESPACE::utils::String
& a);
167
#endif
168
169
#endif
// BIORBD_UTILS_STRING_H
BIORBD_NAMESPACE::utils::String
Wrapper around the std::string class with augmented functionality.
Definition
String.h:18
BIORBD_NAMESPACE::utils::String::removeTrailing
static String removeTrailing(const String &origin, const String &trailTag)
The trailing tags of a string.
Definition
String.cpp:106
BIORBD_NAMESPACE::utils::String::tolower
static String tolower(const String &str)
Convert a string to a lower case string.
Definition
String.cpp:76
BIORBD_NAMESPACE::utils::String::toupper
static String toupper(const String &str)
Convert a string to a upper case string.
Definition
String.cpp:84
BIORBD_NAMESPACE::utils::String::operator=
String & operator=(const String &other)
Allow to use operator=.
Definition
String.cpp:22
BIORBD_NAMESPACE::utils::String::String
String()
Construct string.
Definition
String.cpp:13
BIORBD_NAMESPACE::utils::String::operator+
String operator+(size_t val)
Append an unsigned int to the string.
Definition
String.cpp:41
BIORBD_NAMESPACE::utils::String::to_string
static String to_string(double val)
Overload of the to_string C++11 function to allow for X-digits precision.
Definition
String.cpp:92
BIORBD_NAMESPACE::utils::String::operator()
String operator()(size_t idx) const
Get a specific character in the string.
Definition
String.cpp:49
include
Utils
String.h
Generated by
1.18.0