From -1157026796035894858
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ae3be6396bd7be12
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-07-29 08:16:43 PST
Newsgroups: comp.std.c++
Path: bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!news.cygnus.com!news!jason
From: jason@cygnus.com (Jason Merrill)
Subject: Re: Standard C++ String classes
In-Reply-To: JdeBP@osmium.jba.co.uk's message of 28 Jul 1994 11:52:31 GMT
Content-Type: text/plain; charset=US-ASCII
Message-ID: <JASON.94Jul29012103@deneb.cygnus.com>
Sender: news@cygnus.com
Nntp-Posting-Host: deneb.cygnus.com
Organization: Cygnus Support, Mountain View, CA
References: <31865v$sq8@silver.jba.co.uk>
Mime-Version: 1.0
Date: Fri, 29 Jul 1994 08:21:03 GMT
Lines: 24

>>>>> Jonathan de Boyne Pollard <JdeBP@osmium.jba.co.uk> writes:

> 1.    What are the semantics of embedded NULs in strings ?
They have no special semantics.

> 1.2   If embedded NULs are allowed and the string length takes
>       account of them, what are the semantics of 
>       string::operator const char * ?
There is no such operator.  There is a member function c_str which tacks a
NUL onto the end of the array and returns it.  It does not look inside the
array to see if there are any already there.

> 1.3   Do embedded NULs cause loss of contents during concatenation ?
No.

> 1.4   Do embedded NULs cause loss of contents during substring extraction?
No.

> 2.    What are the semantics of substrings ?
There is no proper substring class; there is a substring method which
returns a new string copied from the old one.  I imagine that a string
class which provides substring management will be a popular derivation.

Jason


