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

# isEqualTo

Compares the data with a pointer to bytes

## Declaration

```occ
bool isEqualTo(const void *bytes, size_t numBytes);
```

```occ
virtual bool isEqualTo(const void *bytes, unsigned int numBytes);
```

## Parameters

- `bytes`: C-pointer to untyped data.
- `numBytes`: Count of bytes to be compared.

## Return Value

Return Value true iff the length of the data are equal and all bytes are identical.

## Discussion

Discussion If the passed data has the same length and all bytes are identical, true is returned. Otherwise false is returned.

## See Also

### Comparing Data Objects

- [isEqualTo](kernel/osdata/3180882-isequalto.md)
- [isEqualTo](kernel/osdata/3433843-isequalto.md)
- [isEqualTo](kernel/osdata/3433858-isequalto.md)
