title: How do I detect a palindrome in C?
body: <p>I've been working through potential interview questions and one of them was to write a function in C to detect whether a given string was a palindrome or not.</p>
  
  <p>I've gotten a pretty good start on it:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdbool.h&gt;
  
  bool isPalindrome(char *value);
  
  bool isPalindrome(char *value)
  {
      if (value == null)
          return false;
  
      char *begin = value;
      char *end = begin + strlen(value) - 1;
  
      while(*begin == *end)
      {
          if ((begin == end) || (begin+1 == end))
              return true;
  
          begin++;
          end--;
      }
  
      return false;
  }
  
  
  int main()
  {
      printf("Enter a string: \n");
      char text[25];
      scanf("%s", text);
  
      if (isPalindrome(text))
      {
          printf("That is a palindrome!\n");
      }
      else
      {
          printf("That is not a palindrome!\n");
      }
  }
  </code></pre>
  
  <p>However, I now want to ensure that I ignore spaces and punctuation.</p>
  
  <p>What is the best way, given the code I have written above, to advance the pointers forward or backward should they encounter punctuation/spaces?</p>