sdk/cpp/agent_test.cc
bool HasEnding(const std::string& full_string, const std::string& ending) {
    if (full_string.length() >= ending.length()) {
        return (0 == full_string.compare (full_string.length() - ending.length(), ending.length(), ending));
    }
    return false;
}
// Returns true if <full_string> ends in <ending>.
Returns true if  ends in .
Returns true if ends in .
bool HasEnding(const std::string& full_string, const std::string& ending) {
    if (full_string.length() >= ending.length()) {
        return (0 == full_string.compare (full_string.length() - ending.length(), ending.length(), ending));
    }
    return false;
}
bool HasEnding ( const std :: string & full_string , const std :: string & ending ) { if ( full_string . length ( ) >= ending . length ( ) ) { return ( 0 == full_string . compare ( full_string . length ( ) - ending . length ( ) , ending . length ( ) , ending ) ) ; } return false ; }
Returns true if <full_string> ends in <ending>.
Returns true if <full_string > ends in <ending > .