substr and error checking
if we have a string for example "test"
and call substr(0,3) for it it will give us the string tes right?
but how does substr work when we call substr(0,10000);
it will give us the string test, but will it check until it finds a '\0' or will it check all the 10000 bytes after the first character of the string? I mean, does substr check for such errors?
substr doesn't take integer arguments. What are you talking about? substr(3): locate substring - Linux man page
I think he's referring to std::string::substr(size_t, size_t).
Originally Posted by C++03 Clause 184.108.40.206 basic_string::substr
ok I understand it now, thanks for help