This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: possible bug in string::substr and usablity question


Jonathan Hudson wrote:

string::substr does not always return
the right substring.

To our best knowledge, the implementation always returns the right substring and indeed your testcase compiles and runs as expected.

Before posting messages pointing out non-existant bugs please study
in detail the concerned sections of the standard or pick a good
book (for strings I suggest Josuttis Ch. 11) (*)

Paolo.

(*) For instance, you will learn that the second argument of substr
is a count not an index.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]