title: Why doesn't std::basic_string::substr follow the [begin, end) convention?
body: <p>The method <a href="http://en.cppreference.com/w/cpp/string/basic_string/substr" rel="nofollow noreferrer"><code>std::basic_string::substr</code></a> has the arguments <code>pos, count</code>, specifying the logical range of elements in positions <em>[pos, pos + count + 1)</em>. Conversely, most of the standard library functions (for example, <a href="http://en.cppreference.com/w/cpp/algorithm/for_each" rel="nofollow noreferrer"><code>std::for_each</code></a>) have arguments, of some form similar to <code>begin, end</code>, specifying the range <em>[begin, end)</em> </p>
  
  <p>This seems to be an exception, then, confusing to some (see the questions <a href="https://stackoverflow.com/questions/24726635/stdstring-substr-method-problems">here</a>, <a href="https://stackoverflow.com/questions/2477850/c-string-substr-function-problem">here</a>, <a href="https://stackoverflow.com/questions/31465277/substr-method-in-c">here</a>, and <a href="https://stackoverflow.com/questions/24810024/why-is-substr-generating-different-results">here</a>). Why wasn't the usual range convention used here? Note also that <a href="http://en.cppreference.com/w/cpp/container/vector/erase" rel="nofollow noreferrer"><code>std::vector::erase</code></a>, a method of another random-access container, <em>does</em> follow the usual convention.</p>