Go to the documentation of this file.
32 char*
strtok(
char* str,
const char* strDelimit,
char** context) noexcept;
50 template <
class OUT_CONTAINER>
53 OUT_CONTAINER& outTokens,
bool skipBlankTokens =
true) noexcept;
56 std::
string trim(const std::
string& str);
60 std::
string upperCase(const std::
string& str);
64 std::
string lowerCase(const std::
string& str);
81 const std::vector<
uint8_t>& inputData, std::
string& outString);
93 const
double val,
int nDecimalDigits = 2,
bool middle_space = true);
97 const std::
string& str, const
size_t total_len,
98 bool truncate_if_larger = false);
101 bool strCmp(const std::
string& s1, const std::
string& s2);
104 bool strCmpI(const std::
string& s1, const std::
string& s2);
108 bool strStarts(const std::
string& str, const std::
string& subStr);
112 bool strStartsI(const std::
string& str, const std::
string& subStr);
117 template <typename T>
122 for (; it != V.end();)
126 if (it != V.end()) ret +=
",";
134 const std::vector<std::string>& lst,
std::string& out,
138 const std::deque<std::string>& lst,
std::string& out,
145 template <
typename T>
148 std::stringstream sin;
const Scalar * const_iterator
unsigned __int16 uint16_t
bool strStartsI(const std::string &str, const std::string &subStr)
Return true if "str" starts with "subStr" (case insensitive)
bool strCmp(const std::string &s1, const std::string &s2)
Return true if the two strings are equal (case sensitive)
void decodeUTF8(const std::string &strUTF8, std::vector< uint16_t > &out_uniStr)
Decodes a UTF-8 string into an UNICODE string.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void encodeUTF8(const std::vector< uint16_t > &input, std::string &output)
Encodes a 2-bytes UNICODE string into a UTF-8 string.
bool decodeBase64(const std::string &inString, std::vector< uint8_t > &outData)
Decode a base-64 string into the original sequence of bytes.
void tokenize(const std::string &inString, const std::string &inDelimiters, OUT_CONTAINER &outTokens, bool skipBlankTokens=true) noexcept
Tokenizes a string according to a set of delimiting characters.
std::string lowerCase(const std::string &str)
Returns an lower-case version of a string.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
char * strtok(char *str, const char *strDelimit, char **context) noexcept
An OS-independent method for tokenizing a string.
std::string unitsFormat(const double val, int nDecimalDigits=2, bool middle_space=true)
This function implements formatting with the appropriate SI metric unit prefix: 1e-12->'p',...
T str2num(std::string const &value)
Original code snippet found in http://stackoverflow.com/a/30357710.
void encodeBase64(const std::vector< uint8_t > &inputData, std::string &outString)
Encode a sequence of bytes as a string in base-64.
std::string rightPad(const std::string &str, const size_t total_len, bool truncate_if_larger=false)
Enlarge the string with spaces up to the given length.
GLsizei const GLfloat * value
bool strStarts(const std::string &str, const std::string &subStr)
Return true if "str" starts with "subStr" (case sensitive)
std::string upperCase(const std::string &str)
Returns a upper-case version of a string.
GLsizei const GLchar ** string
std::string trim(const std::string &str)
Removes leading and trailing spaces.
void stringListAsString(const std::vector< std::string > &lst, std::string &out, const std::string &newline="\r\n")
Convert a string list to one single string with new-lines.
GLenum GLenum GLenum input
bool strCmpI(const std::string &s1, const std::string &s2)
Return true if the two strings are equal (case insensitive)
std::string sprintf_container(const char *fmt, const T &V)
Generates a string for a container in the format [A,B,C,...], and the fmt string for each vector elem...
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at mié 12 jul 2023 10:03:34 CEST | |