title: How to check for palindrome in Swift using recursive definition
body: <p>I like many of the features in Swift, but using manipulating strings are still a big pain in the ass.</p>
  
  <pre><code>func checkPalindrome(word: String) -&gt; Bool {
      print(word)
      if word == "" {
          return true
      } else {
          if word.characters.first == word.characters.last {
              return checkPalindrome(word.substringWithRange(word.startIndex.successor() ..&lt; word.endIndex.predecessor()))
          } else {
              return false
          }
      }
  }
  </code></pre>
  
  <p>This code fails miserably whenever the string's length is an odd number. Of course I could make it so the first line of the block would be <code>if word.characters.count &lt; 2</code>, but is there a way in Swift to get substrings and check easily?</p>
  
  <p><strong>Update</strong>
  I like many of the suggestions, but I guess the original question could be misleading a little, since it's a question about String more than getting the right results for the function.</p>
  
  <p>For instance, in Python, checkPalindrome(word[1:-1]) would work fine for the recursive definition, whereas Swift code is much less graceful since it needs other bells and whistles. </p>