
Functions | |
| char BASE_IMPEXP * | mrpt::system::strtok (char *str, const char *strDelimit, char **context) MRPT_NO_THROWS |
| An OS-independent method for tokenizing a string. More... | |
| void BASE_IMPEXP | mrpt::system::tokenize (const std::string &inString, const std::string &inDelimiters, std::deque< std::string > &outTokens, bool skipBlankTokens=true) MRPT_NO_THROWS |
| Tokenizes a string according to a set of delimiting characters. More... | |
| void BASE_IMPEXP | mrpt::system::tokenize (const std::string &inString, const std::string &inDelimiters, std::vector< std::string > &outTokens, bool skipBlankTokens=true) MRPT_NO_THROWS |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| std::string BASE_IMPEXP | mrpt::system::trim (const std::string &str) |
| Removes leading and trailing spaces. More... | |
| std::string BASE_IMPEXP | mrpt::system::upperCase (const std::string &str) |
| Returns a lower-case version of a string. More... | |
| std::string BASE_IMPEXP | mrpt::system::lowerCase (const std::string &str) |
| Returns an upper-case version of a string. More... | |
| void BASE_IMPEXP | mrpt::system::decodeUTF8 (const std::string &strUTF8, vector_word &out_uniStr) |
| Decodes a UTF-8 string into an UNICODE string. More... | |
| void BASE_IMPEXP | mrpt::system::encodeUTF8 (const vector_word &input, std::string &output) |
| Encodes a 2-bytes UNICODE string into a UTF-8 string. More... | |
| void BASE_IMPEXP | mrpt::system::encodeBase64 (const vector_byte &inputData, std::string &outString) |
| Encode a sequence of bytes as a string in base-64. More... | |
| bool BASE_IMPEXP | mrpt::system::decodeBase64 (const std::string &inString, vector_byte &outData) |
| Decode a base-64 string into the original sequence of bytes. More... | |
| std::string BASE_IMPEXP | 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 BASE_IMPEXP | 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 BASE_IMPEXP | mrpt::system::strCmp (const std::string &s1, const std::string &s2) |
| Return true if the two strings are equal (case sensitive) More... | |
| bool BASE_IMPEXP | mrpt::system::strCmpI (const std::string &s1, const std::string &s2) |
| Return true if the two strings are equal (case insensitive) More... | |
| bool BASE_IMPEXP | mrpt::system::strStarts (const std::string &str, const std::string &subStr) |
| Return true if "str" starts with "subStr" (case sensitive) More... | |
| bool BASE_IMPEXP | 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... | |
| bool BASE_IMPEXP mrpt::system::decodeBase64 | ( | const std::string & | inString, |
| vector_byte & | outData | ||
| ) |
Decode a base-64 string into the original sequence of bytes.
| void BASE_IMPEXP mrpt::system::decodeUTF8 | ( | const std::string & | strUTF8, |
| vector_word & | out_uniStr | ||
| ) |
Decodes a UTF-8 string into an UNICODE string.
See http://en.wikipedia.org/wiki/UTF-8 and http://www.codeguru.com/cpp/misc/misc/multi-lingualsupport/article.php/c10451/.
| void BASE_IMPEXP mrpt::system::encodeBase64 | ( | const vector_byte & | inputData, |
| std::string & | outString | ||
| ) |
Encode a sequence of bytes as a string in base-64.
| void BASE_IMPEXP mrpt::system::encodeUTF8 | ( | const vector_word & | input, |
| std::string & | output | ||
| ) |
Encodes a 2-bytes UNICODE string into a UTF-8 string.
See http://en.wikipedia.org/wiki/UTF-8 and http://www.codeguru.com/cpp/misc/misc/multi-lingualsupport/article.php/c10451/.
| std::string BASE_IMPEXP mrpt::system::lowerCase | ( | const std::string & | str | ) |
Returns an upper-case version of a string.
| std::string BASE_IMPEXP 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.
| 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.
Definition at line 106 of file string_utils.h.
References mrpt::format().
| bool BASE_IMPEXP mrpt::system::strCmp | ( | const std::string & | s1, |
| const std::string & | s2 | ||
| ) |
Return true if the two strings are equal (case sensitive)
| bool BASE_IMPEXP mrpt::system::strCmpI | ( | const std::string & | s1, |
| const std::string & | s2 | ||
| ) |
Return true if the two strings are equal (case insensitive)
Referenced by mrpt::utils::CMHPropertiesValuesList::getElemental(), mrpt::graphs::detail::graph_ops< graph_t >::load_graph_of_poses_from_text_file(), and mrpt::utils::CMHPropertiesValuesList::setElemental().
| bool BASE_IMPEXP mrpt::system::strStarts | ( | const std::string & | str, |
| const std::string & | subStr | ||
| ) |
Return true if "str" starts with "subStr" (case sensitive)
Referenced by mrpt::utils::CTextFileLinesParser::getNextLine().
| bool BASE_IMPEXP mrpt::system::strStartsI | ( | const std::string & | str, |
| const std::string & | subStr | ||
| ) |
Return true if "str" starts with "subStr" (case insensitive)
| char BASE_IMPEXP* mrpt::system::strtok | ( | char * | str, |
| const char * | strDelimit, | ||
| char ** | context | ||
| ) |
An OS-independent method for tokenizing a string.
The extra parameter "context" must be a pointer to a "char*" variable, which needs no initialization and is used to save information between calls to strtok.
| void BASE_IMPEXP mrpt::system::tokenize | ( | const std::string & | inString, |
| const std::string & | inDelimiters, | ||
| std::deque< std::string > & | outTokens, | ||
| bool | skipBlankTokens = true |
||
| ) |
Tokenizes a string according to a set of delimiting characters.
Example:
Will generate 3 tokens:
| [in] | skipBlankTokens | If true, consecutive "delimiters" will be considered one single delimiters. If false, a blank token will be returned between each pair of delimiters. |
Referenced by mrpt::utils::CConfigFileBase::read_vector().
| void BASE_IMPEXP mrpt::system::tokenize | ( | const std::string & | inString, |
| const std::string & | inDelimiters, | ||
| std::vector< std::string > & | outTokens, | ||
| bool | skipBlankTokens = true |
||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| std::string BASE_IMPEXP mrpt::system::trim | ( | const std::string & | str | ) |
Removes leading and trailing spaces.
Referenced by mrpt::utils::CTextFileLinesParser::getNextLine().
| std::string BASE_IMPEXP 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'.
| std::string BASE_IMPEXP mrpt::system::upperCase | ( | const std::string & | str | ) |
Returns a lower-case version of a string.
| Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Fri Sep 3 01:11:30 UTC 2021 |