title: String to enum mapping in Swift
body: <p>I have an enum defined in Swift as follows:</p>
  
  <pre><code> public enum Command:String {
  
     case first = "FirstCommand"
     case second = "SecondCommand"
     ...
     ...
     case last = "lastCommand"
   }
  </code></pre>
  
  <p>Now I receive a command dictionary from server and I extract the command string from it. The command string would typically be one of the raw values in Command enum or sometimes it could be a command outside the enum(example, new commands are introduced in future versions of client/server but client is still old). In this scenario, what is the way to use switch statement in Swift 3? How do I typecast the command string to enum and handle the unknown commands in default case of switch?</p>