title: Are there any advantages/disadvantages of using a for loop incrementing over an integer versus character pointer?
body: <p>Recently, I stumbled upon the need of creating a string library for my specific use case in C. Specifically, I wanted to lowercase all characters in a string. I wondered if it is more efficient to use a for loop that increments 1 until the end of the string or is it better (a millimeter of more performance?) to increment a character pointer?</p>
  <p>Without incrementing the char pointer:</p>
  <pre><code>void string_tolowercase_s(string_t *dest) {
      for (int i = 0; i &lt; dest-&gt;text_length; i++)
          dest-&gt;text[i] = tolower(dest-&gt;text[i]);
  }
  </code></pre>
  <p>Incrementing the char pointer:</p>
  <pre><code>void string_tolowercase_s(string_t *dest) {
      for (char *letter = dest-&gt;text; *letter; letter++)
          *letter = tolower(*letter);
  }
  </code></pre>
  <p><strong>EDIT</strong>: The string is guaranteed to contain the null terminator ('\0').</p>