title: What is the Swift equivalent of isEqualToString in Objective-C?
body: <p>I am trying to run the code below:</p>
  
  <pre class="lang-swift prettyprint-override"><code>import UIKit
  
  class LoginViewController: UIViewController {
  
  @IBOutlet var username : UITextField = UITextField()
  @IBOutlet var password : UITextField = UITextField()
  
  @IBAction func loginButton(sender : AnyObject) {
  
      if username .isEqual("") || password.isEqual(""))
      {
          println("Sign in failed. Empty character")
      }
  }
  </code></pre>
  
  <p>My previous code was in Objective-C, which was working fine:</p>
  
  <pre><code> if([[self.username text] isEqualToString: @""] ||
      [[self.password text] isEqualToString: @""] ) {
  </code></pre>
  
  <p>I assume I cannot use <code>isEqualToString</code> in Swift. Any help would be appreciated.</p>