substr and error checking

This is a discussion on substr and error checking within the C++ Programming forums, part of the General Programming Boards category; if we have a string for example "test"
and call substr(0,3) for it it will give us the string tes ...