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

# isEqualTo

Compares the string with an OSString.

## Declaration

```occ
bool isEqualTo(const OSString *aString);
```

```occ
virtual bool isEqualTo(const OSString *aString);
```

## Parameters

- `aString`: The OSString to compare with.

## Return Value

Return Value true iff the two strings have the same length and characters.

## Discussion

Discussion If the passed OSString object has the same length and all characters are identical, true is returned. Otherwise false is returned.

## See Also

### Comparing Strings

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