StringUtils.hh File Reference
#include <string>
#include <vector>
#include <gz/common/Export.hh>
Go to the source code of this file.
Namespaces | |
namespace | gz |
Forward declarations for the common classes. | |
namespace | gz::common |
Functions | |
bool | EndsWith (const std::string &_s1, const std::string &_s2) |
return true if string ends with another string | |
std::string | Join (const std::vector< std::string > &_orig, char _delim) |
Join a sequence of strings with a delimiter. | |
std::string | Join (const std::vector< std::string > &_orig, const std::string &_delim) |
Join a sequence of strings with a delimiter. | |
std::string | PluralCast (const std::string &_baseWord, const int _n) |
Choose whether to use a singular or plural version of a noun based on the value of an integer quantity. This version will simply add an 's' character to _baseWord in the event that std::abs(_n) != 1, otherwise it returns _baseWord. | |
std::string | PluralCast (const std::string &_singular, const std::string &_plural, const int _n) |
A version of PluralCast that works for irregular nouns. If std::abs(_n)==1 then _singular is returned; otherwise _plural will be returned. | |
std::vector< std::string > | Split (const std::string &_orig, char _delim) |
split at a one character delimiter to get a vector of something | |
bool | StartsWith (const std::string &_s1, const std::string &_s2) |
return true if string starts with another string | |