---
title: isEqualTo
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15.2+]
path: kernel/osstring/3434577-isequalto
---

# isEqualTo

Compares the string with an OSObject

## Declaration

```occ
virtual bool isEqualTo(const OSMetaClassBase *anObject);
```

## Parameters

- `anObject`: The object to compare with.

## Return Value

Return Value true iff the object is of class OSData or OSString and isEqualTo() returns true.

## Discussion

Discussion If the object is of class OSString, the result of isEqualTo(const OSString * aDataObj) is returned. If the object is of class OSData, the result of isEqualTo(const OSData * aDataObj) is returned. Otherwise false is returned.

## See Also

### Comparing Strings

- [isEqualTo](kernel/osstring/3180976-isequalto.md)
- [isEqualTo](kernel/osstring/3433852-isequalto.md)
- [isEqualTo](kernel/osstring/3433853-isequalto.md)
