How to check are 3 strings equal in Swift?
ios, swift
Solution
I don't think so. That's about as straightforward as it gets. (And an improvement on C and ObjC, too — you can use the `==` operator instead of calling `strcmp` or `isEqual:`.)
If you really want to go nuts with it, you might be able to write `v1 == v2 == v3` if you created a couple of custom `==` operator overloads. (This is left as an exercise for the reader.) But it's probably not worthwhile.
Problem
I this is my code, and it is working ``` if (v1 == v2) && (v2 == v3) { println("3 strings are equal") } ``` Is there any other more Swift way to do it ? My implementation look like C code :-)