Gazebo Common

API Reference

3.17.0
gz/common/StringUtils.hh File Reference
#include <string>
#include <vector>
#include <gz/common/Export.hh>

Go to the source code of this file.

Namespaces

 ignition
 Forward declarations for the common classes.
 
 ignition::common
 

Functions

bool EndsWith (const std::string &_s1, const std::string &_s2)
 return true if string ends with another string More...
 
std::string Join (const std::vector< std::string > &_orig, char _delim)
 Join a sequence of strings with a delimiter. More...
 
std::string Join (const std::vector< std::string > &_orig, const std::string &_delim)
 Join a sequence of strings with a delimiter. More...
 
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. More...
 
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. More...
 
std::vector< std::stringSplit (const std::string &_orig, char _delim)
 split at a one character delimiter to get a vector of something More...
 
bool StartsWith (const std::string &_s1, const std::string &_s2)
 return true if string starts with another string More...