Actions
Feature #2090
closedPartial Name comparison
Start date:
Due date:
% Done:
100%
Estimated time:
2.00 h
Description
This task is to match Name::compare
with std::string::compare
(for partial name comparison):
class Name
{
public:
/** \brief indicates "until the end" in getSubName and compare
*/
static const size_t npos;
/** \brief compares [pos1 ,pos1+count1) components in this Name to all components in \p other
*
* This is equivalent to this->getSubName(pos1, count1).compare(other);
*/
int
compare(size_t pos1, size_t count1, const Name& other);
/** \brief compares [pos1, pos1+count1) components in this Name to [pos2, pos2+count2) components in \p other
*
* This is equivalent to this->getSubName(pos1, count1).compare(other.getSubName(pos2, count2));
*/
int
compare(size_t pos1, size_t count1, const Name& other, size_t pos2, size_t count2 = npos);
}
Actions