Added removeAllFields() for a field name.
This commit is contained in:
parent
b9471c9543
commit
9b31891938
@ -295,6 +295,15 @@ void header::removeAllFields()
|
||||
}
|
||||
|
||||
|
||||
void header::removeAllFields(const string& fieldName)
|
||||
{
|
||||
std::vector <ref <headerField> > fields = findAllFields(fieldName);
|
||||
|
||||
for (unsigned int i = 0 ; i < fields.size() ; ++i)
|
||||
removeField(fields[i]);
|
||||
}
|
||||
|
||||
|
||||
const int header::getFieldCount() const
|
||||
{
|
||||
return (m_fields.size());
|
||||
|
@ -181,6 +181,10 @@ public:
|
||||
*/
|
||||
void removeAllFields();
|
||||
|
||||
/** Remove all fields with the specified name.
|
||||
*/
|
||||
void removeAllFields(const string& fieldName);
|
||||
|
||||
/** Return the number of fields in the list.
|
||||
*
|
||||
* @return number of fields
|
||||
|
Loading…
Reference in New Issue
Block a user