Instance Method インスタンスメソッド

isLike(_:)

Returns a Boolean value that indicates whether the receiver is "like" another given object. レシーバが別の与えられたオブジェクトと「似ている」かどうかを指し示すブール値を返します。

Declaration 宣言

func isLike(_ object: String) -> Bool

Parameters パラメータ

object

The object with which to compare the receiver.

Return Value 戻り値

true if the receiver is considered to be “like” object, otherwise false.

Discussion 解説

Currently, isLike(_:) messages are never sent to any object from within Cocoa itself.

The default implementation for this method provided by NSObject method returns false. NSString also provides an implementation of this method, which returns true if the receiver matches a pattern described by object.

See Also 参照

Performing comparisons 比較を実行する