title: How to output two characters as one single char?
body: <p>In my assignment, our function receives a string of words and returns a string with the words hyphenated, as defined by the following rules:</p>
  <blockquote>
  <ol>
  <li><p>If a vowel-consonant-consonant-vowel pattern is found, hyphenate between the two consonants. Letters ‘a’, ‘e’, ‘i’, ‘o’, ‘u’, and ‘y’ are vowels; all other characters are consonants.</p>
  </li>
  <li><p>If a vowel-consonant-vowel pattern is found, hyphenate before the consonant unless the second vowel is an ‘e’ and occurs at the end of the word.</p>
  </li>
  <li><p>The following character sequences are never divided by hyphens: “qu”, “tr”, “br”, “str”, “st”, “sl”, “bl”, “cr”, “ph”, “ch”. For the purposes of rules 1 and 2, each of these are single consonants.</p>
  </li>
  </ol>
  </blockquote>
  <p>For rule #3, I want to know how the character sequences can be read as a single consonant.</p>
  <p>My code for the special cases is:</p>
  <pre class="lang-cpp prettyprint-override"><code>bool isSpecialCharSequence(const char* input, int index)
  {
      if (input[index + 1] == 'r' || input[index + 1] == 'R')
      {
          if (input[index] == 't' || input[index] == 'b' || input[index] == 'c' || input[index] == 'T' || input[index] == 'B' || input[index] == 'C')
          {
              return false;
          }
          return true;
      }
      if (input[index] == 's' || input[index] == 'S')
      {
          if (input[index + 1] == 't' || input[index] == 'l' || input[index] == 'T' || input[index] == 'L')
          {
              return false;
          }
          return true;
      }
  
      if (input[index] == 'q' || input[index] == 'Q')
      {
          if (input[index + 1] == 'u' || input[index + 1] == 'U')
          {
              return false;
          }
          return true;
      }
  
      if (input[index + 1] == 'h' || input[index + 1] == 'H')
      {
          if (input[index] == 'c' || input[index] == 'p' || input[index] == 'C' || input[index] == 'P')
          {
              return false;
          }
          return true;
      }
  }
  </code></pre>
  <p>Right now, it works for everything except reading those characters as one single consonant instead of 2.</p>