All Projects → kateinoigakukun → AnyEquatable

kateinoigakukun / AnyEquatable

Licence: other
No description, website, or topics provided.

Programming Languages

swift
15916 projects
c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

AnyEquatable

Provide func isEqual(_: Any, _: Any) -> Bool function which compares values even if they are not Equatable.

AnyEquatable.isEqual("abc", "abc") // true
AnyEquatable.isEqual(1, 3) // false

// Compare not Equatable types
struct NotEquatable {}
AnyEquatable.isEqual(NotEquatable(), NotEquatable()) // false

// Compare different types
AnyEquatable.isEqual(1, "abc") // false
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].