Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
string.cpp File Reference
#include "momentum/common/string.h"
#include <algorithm>
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  momentum

Functions

template<typename StringType>
StringType momentum::trim (const StringType &text, const char *whiteChars=" \t")
 Returns a copy of the string with leading and trailing characters in whiteChars removed.
template std::string momentum::trim (const std::string &text, const char *whiteChars)
template std::string_view momentum::trim (const std::string_view &text, const char *whiteChars)
std::string momentum::trim (const char *text, const char *whiteChars=" \t")
 Returns a copy of the null-terminated C string with leading and trailing characters in whiteChars removed.
std::vector< std::string > momentum::tokenize (const std::string &inputString, const std::string &delimiters=" \t\r\n", bool trim=true)
 Tokenizes a string using the specified single-byte delimiter characters.
std::vector< std::string_view > momentum::tokenize (std::string_view inputString, std::string_view delimiters=" \t\r\n", bool trim=true)
 Tokenizes a string_view using the specified single-byte delimiter characters.