Jamba C++ API 8.0.0
Loading...
Searching...
No Matches
StringUtils.h File Reference
#include <string>
#include <concepts>
#include <sstream>
#include <vector>
#include <iterator>
#include <algorithm>

Go to the source code of this file.

Namespaces

namespace  pongasoft
namespace  pongasoft::Utils

Concepts

concept  pongasoft::Utils::StringOutputIterator
 A concept to check if T is an output iterator that accepts std::string.

Functions

template<std::floating_point T>
std::vector< T > splitFloats (const std::string &iString, char iDelimiter, bool iSkipEmptyEntries=false)
 Converts the string to an array of floating points (floats or doubles).
std::vector< std::string > splitString (const std::string &iString, char iDelimiter, bool iSkipEmptyEntries)
 Split a string according to a delimiter and returns a vector.
template<StringOutputIterator Out>
void splitString (const std::string &iString, char iDelimiter, Out oResult, bool iSkipEmptyEntries=false)
 Split a string according to a delimiter and writes the result into Out (can be a vector, array, etc...).
template<std::floating_point T>
stringToFloat (const std::string &iString)
 Converts the string to a floating point (float or double).
template<std::floating_point T>
bool stringToFloat (const std::string &iString, T &oValue)
 Converts the string to a floating point (float or double).
constexpr char const * to_string (bool iValue)
 Convenient call to convert a boolean into a string.