Feature #2090
Updated by Junxiao Shi almost 11 years ago
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
*/
public 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);
}
```