Article View: comp.std.c++
Article #4021Re: char_traits<T> return values
From: Nathan Myers ncm
Date: Sat, 13 Apr 1996 23:17
Date: Sat, 13 Apr 1996 23:17
22 lines
1681 bytes
1681 bytes
Rich Paul wrote: > I have noticed, while working on the standard string class, that the > char_traits functions ... > ... when these functions get a string that contains eos(), do they > stop, or do they carry on to the bitter end? C++ strings don't pass judgment on what's in them; eos() is used purely as the value to slap onto the end when producing a c_str() value, or the terminator when constructing from a const char*. It only matters when you convert back via c_str(); then, of course, to C the string will look shorter than it is. Tough. Nathan Myers ncm@cantrip.org http://www.cantrip.org/ [ comp.std.c++ is moderated. To submit articles: try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ] [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ] [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Technical Details
Message-ID:
<316F5716.53ABC674@cantrip.org>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<316DB8A8.2556@cyberspy.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: "Nathan Myers <ncm@cantrip.org>" <ncm@cantrip.org> Newsgroups: comp.std.c++ Subject: Re: char_traits<T> return values Date: 13 Apr 1996 23:17:19 GMT Organization: Best Internet Communications Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <316F5716.53ABC674@cantrip.org> References: <316DB8A8.2556@cyberspy.com> NNTP-Posting-Host: taumet.eng.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nntp-Posting-Host: ncm.vip.best.com X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i386) Content-Length: 606 Originator: clamage@taumet