// Eq returns true if the left StringElement is equal to the right StringElement.
// When both are nil Eq returns false because nil actualy signifies "unknown"
// and you can't compare two things when you don't know what they are.
Eq returns true if the left StringElement is equal to the right StringElement.
When both are nil Eq returns false because nil actualy signifies "unknown"
and you can't compare two things when you don't know what they are.
// Eq returns true if the left StringElement is equal to the right StringElement . // When both are nil Eq returns false because nil actualy signifies " unknown " // and you can ' t compare two things when you don ' t know what they are .
func (e StringElement) Eq(r Element) (bool, error) {
	if e.IsNil() && r.IsNil() {
		return false, nil
	}
	return e.compare(r, func(left, right string) bool {
		return left == right
	})
}
func ( e StringElement ) Eq ( r Element ) ( bool , error ) { if e . IsNil ( ) && r . IsNil ( ) { return false , nil } return e . compare ( r , func ( left , right string ) bool { return left == right } ) }
Eq returns true if the left StringElement is equal to the right StringElement.
Eq returns true if the left StringElement is equal to the right StringElement .