Go to the documentation of this file.
29 #include <unordered_map>
40 inline const std::string&
to_string(
const std::string&
s)
60 std::stringstream
str;
65 bool Contains(
const std::string& haystack,
const std::string& needle,
bool caseInsensitive =
false);
67 std::vector<std::string>
Split(
const std::string&
source,
const std::string& splitBy,
bool trimElements =
false,
bool removeEmptyElements =
false);
68 std::vector<std::string>
split(
const std::string&
source,
const std::string& splitBy,
bool trimElements =
false,
bool removeEmptyElements =
false);
69 bool starts_with(
const std::string& haystack,
const std::string& needle);
70 bool ends_with(
const std::string& haystack,
const std::string& needle);
75 buffer.reserve(
data.size());
76 for (
size_t pos = 0; pos !=
data.size(); ++pos)
81 buffer.append(
"&");
84 buffer.append(
""");
87 buffer.append(
"'");
90 buffer.append(
"<");
93 buffer.append(
">");
96 buffer.append(&
data[pos], 1);
108 template <
typename T>
119 str <<
"Vector<" << armarx::GetTypeString<T>() <<
">(" << vector.size() <<
"):\n";
121 for (
unsigned int i = 0; i < vector.size(); ++i)
123 str <<
"\t(" << i <<
"): " << vector.at(i) <<
"\n";
133 str <<
"Deque<" << armarx::GetTypeString<T>() <<
">(" << deque.size() <<
"):\n";
135 for (
unsigned int i = 0; i < deque.size(); ++i)
137 str <<
"\t(" << i <<
"): " << deque.at(i) <<
"\n";
143 template<
typename T1,
typename T2>
147 str <<
"Pair<" << armarx::GetTypeString<T1>() <<
", " << armarx::GetTypeString<T2>() <<
">:\n";
148 str <<
"\t(" << pair.first <<
", " << pair.second <<
")\n";
152 template<
typename T1,
typename T2>
156 str <<
"Map<" << armarx::GetTypeString<T1>() <<
", " << armarx::GetTypeString<T2>() <<
">(" << map.size() <<
"):\n";
157 for (
const auto& pair : map)
159 str <<
"\t" << pair.first <<
": " << pair.second <<
"\n";
164 template<
typename T1,
typename T2>
168 str <<
"Unordered Map<" << armarx::GetTypeString<T1>() <<
", " << armarx::GetTypeString<T2>() <<
">(" << map.size() <<
"):\n";
169 for (
const auto& pair : map)
171 str <<
"\t" << pair.first <<
": " << pair.second <<
"\n";
178 return str << static_cast<void*>(
nullptr);
182 #define VAROUT(x) std::string(std::string(#x) +": " + armarx::ValueToString(x)) + " "
unsigned int toUInt(const std::string &input)
int toInt(const std::string &input)
bool Contains(const ContainerType &container, const ElementType &searchElement)
std::vector< std::string > Split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
float toFloat(const std::string &input)
Converts a string to float and uses always dot as seperator.
std::string Encode(const std::string &data)
bool starts_with(const std::string &haystack, const std::string &needle)
void EncodeInline(std::string &data)
std::shared_ptr< Value > value()
std::string ValueToString(const T &value)
ReaderT::InputType & input
std::string to_string(std::string s)
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
const std::string & to_string(const std::string &s)
ARMARXCORE_IMPORT_EXPORT ostream & operator<<(ostream &stream, const armarx::RunningTaskIceBase &task)
bool ends_with(const std::string &haystack, const std::string &needle)
double s(double t, double s0, double v0, double a0, double j)
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::vector< std::string > split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)