title: Which tolower in C++?
body: <p>Given <code>string foo</code>, I've written <a href="https://stackoverflow.com/a/37438120/2642059">answers</a> on how to use <code>cctype</code>'s <a href="http://en.cppreference.com/w/cpp/string/byte/tolower" rel="nofollow noreferrer"><code>tolower</code></a> to convert the characters to lowercase</p>
  
  <pre><code>transform(cbegin(foo), cend(foo), begin(foo), static_cast&lt;int (*)(int)&gt;(tolower))
  </code></pre>
  
  <p>But I've <a href="https://stackoverflow.com/q/37436755/2642059">begun to consider</a> <code>locale</code>'s <a href="http://en.cppreference.com/w/cpp/locale/tolower" rel="nofollow noreferrer"><code>tolower</code></a>, which could be used like this:</p>
  
  <pre><code>use_facet&lt;ctype&lt;char&gt;&gt;(cout.getloc()).tolower(data(foo), next(data(foo), foo.size()));
  </code></pre>
  
  <ul>
  <li>Is there a reason to prefer one of these over the other? </li>
  <li>Does their functionality differ at all? </li>
  <li>I mean other than the fact that <code>tolower</code> accepts and returns an <code>int</code> which I assume is just some antiquated C stuff?</li>
  </ul>