diff --git a/dn.go b/dn.go index 5408a565..8b4a5c6e 100644 --- a/dn.go +++ b/dn.go @@ -205,3 +205,9 @@ func (r *RelativeDN) hasAllAttributes(attrs []*AttributeTypeAndValue) bool { func (a *AttributeTypeAndValue) Equal(other *AttributeTypeAndValue) bool { return strings.EqualFold(a.Type, other.Type) && a.Value == other.Value } + +// EqualFold returns true if the AttributeTypeAndValue is equivalent to the specified AttributeTypeAndValue +// Case of the attribute type and value is not significant +func (a *AttributeTypeAndValue) EqualFold(other *AttributeTypeAndValue) bool { + return strings.EqualFold(a.Type, other.Type) && strings.EqualFold(a.Type, other.Type) +}