<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/isLike(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)isLike:"
  },
  "title" : "isLike(_:)"
}
-->

# isLike(_:)

Returns a Boolean value that indicates whether the receiver is “like” another given object.

```
func isLike(_ object: String) -> Bool
```

## Parameters

`object`

The object with which to compare the receiver.

## Return Value

[`YES`](/documentation/ObjectiveC/YES) if the receiver is considered to be “like” `object`, otherwise [`NO`](/documentation/ObjectiveC/NO).

## Discussion

Currently, [`isLike(_:)`](/documentation/ObjectiveC/NSObject-swift.class/isLike(_:)) messages are never sent to any object from within Cocoa itself.

The default implementation for this method provided by `NSObject` method returns [`NO`](/documentation/ObjectiveC/NO). `NSString` also provides an implementation of this method, which returns [`YES`](/documentation/ObjectiveC/YES) if the receiver matches a pattern described by `object`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)