Main MRPT website > C++ reference for MRPT 1.9.9
Namespaces | Functions
string_utils.h File Reference
#include <mrpt/utils/utils_defs.h>
#include <deque>

Go to the source code of this file.

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::system
 This namespace provides a OS-independent interface to many useful functions: filenames manipulation, time and date, string parsing, file I/O, threading, memory allocation, etc.
 

Functions

char * mrpt::system::strtok (char *str, const char *strDelimit, char **context) noexcept
 An OS-independent method for tokenizing a string. More...
 
void mrpt::system::tokenize (const std::string &inString, const std::string &inDelimiters, std::deque< std::string > &outTokens, bool skipBlankTokens=true) noexcept
 Tokenizes a string according to a set of delimiting characters. More...
 
void mrpt::system::tokenize (const std::string &inString, const std::string &inDelimiters, std::vector< std::string > &outTokens, bool skipBlankTokens=true) noexcept
 
std::string mrpt::system::trim (const std::string &str)
 Removes leading and trailing spaces. More...
 
std::string mrpt::system::upperCase (const std::string &str)
 Returns a upper-case version of a string. More...
 
std::string mrpt::system::lowerCase (const std::string &str)
 Returns an lower-case version of a string. More...
 
void mrpt::system::decodeUTF8 (const std::string &strUTF8, vector_word &out_uniStr)
 Decodes a UTF-8 string into an UNICODE string. More...
 
void mrpt::system::encodeUTF8 (const vector_word &input, std::string &output)
 Encodes a 2-bytes UNICODE string into a UTF-8 string. More...
 
void mrpt::system::encodeBase64 (const vector_byte &inputData, std::string &outString)
 Encode a sequence of bytes as a string in base-64. More...
 
bool mrpt::system::decodeBase64 (const std::string &inString, vector_byte &outData)
 Decode a base-64 string into the original sequence of bytes. More...
 
std::string mrpt::system::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', 1e-9->'n', 1e-6->'u', 1e-3->'m', 1->'', 1e3->'K', 1e6->'M', 1e9->'G', 1e12->'T'. More...
 
std::string mrpt::system::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. More...
 
bool mrpt::system::strCmp (const std::string &s1, const std::string &s2)
 Return true if the two strings are equal (case sensitive) More...
 
bool mrpt::system::strCmpI (const std::string &s1, const std::string &s2)
 Return true if the two strings are equal (case insensitive) More...
 
bool mrpt::system::strStarts (const std::string &str, const std::string &subStr)
 Return true if "str" starts with "subStr" (case sensitive) More...
 
bool mrpt::system::strStartsI (const std::string &str, const std::string &subStr)
 Return true if "str" starts with "subStr" (case insensitive) More...
 
template<typename T >
std::string mrpt::system::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 element. More...
 
template<typename T >
mrpt::system::str2num (std::string const &value)
 Original code snippet found in http://stackoverflow.com/a/30357710. More...
 
template<typename T >
std::string mrpt::system::num2str (T const &value)
 Convert number instance to string. More...
 



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019