---
title: isEqualTo
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/osstring/isequalto-5paj5
---

# isEqualTo

Compares the string with an OSString.

## Declaration

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

## 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](driverkit/osstring/isequalto-1uq1f.md)
- [isEqualTo](driverkit/osstring/isequalto-712xj.md)
- [isEqualTo](driverkit/osstring/isequalto-2rg80.md)
