Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Replacing NULLS with space (C strings) |
| Date | 2012-02-09 17:27 -0800 |
| Organization | None to speak of |
| Message-ID | <lnk43vlbox.fsf@nuthaus.mib.org> (permalink) |
| References | <jh19o6$qnl$1@speranza.aioe.org> <jh1d2u$8ku$1@reader1.panix.com> <4F346336.E97@mindspring.com> <76f3fbf8-e9d6-402c-a2f0-e3bbad12540e@h6g2000yqk.googlegroups.com> |
Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
> On Feb 10, 12:22 am, pete <pfil...@mindspring.com> wrote:
>> By definition, a string includes a null character.
>>
>> ISO/IEC 9899:201x Committee Draft — April 12, 2011 N1570
>> 7. Library
>> 7.1 Introduction
>> 7.1.1 Definitions of terms
>> 1 A string is a contiguous sequence of characters
>> terminated by and including the first null character.
>>
> In ANSI C terminology. That's so that they can use the term "string"
> in describing library functions without constantly having to specify
> that it must be nul-terminated.
> However the strings in your C program may not be nul-terminated.
Then they're not strings, and calling them that will cause confusion.
They might well be some data structure that acts like a string in a
more general sense, but then there should be an unambiguous name for it.
And so far, we have no idea what kind of data structure the OP is
dealing with, other than an array of characters.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Replacing NULLS with space (C strings) peter <pc722@nospam.mail.com.br> - 2012-02-09 20:19 +0000
Re: Replacing NULLS with space (C strings) James Kuyper <jameskuyper@verizon.net> - 2012-02-09 15:46 -0500
Re: Replacing NULLS with space (C strings) Anders Wegge Keller <wegge@wegge.dk> - 2012-02-09 22:04 +0100
Re: Replacing NULLS with space (C strings) James Kuyper <jameskuyper@verizon.net> - 2012-02-09 16:15 -0500
Re: Replacing NULLS with space (C strings) John Gordon <gordon@panix.com> - 2012-02-09 21:16 +0000
Re: Replacing NULLS with space (C strings) Keith Thompson <kst-u@mib.org> - 2012-02-09 13:29 -0800
Re: Replacing NULLS with space (C strings) Keith Thompson <kst-u@mib.org> - 2012-02-09 13:29 -0800
Re: Replacing NULLS with space (C strings) pete <pfiland@mindspring.com> - 2012-02-09 19:22 -0500
Re: Replacing NULLS with space (C strings) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-09 16:36 -0800
Re: Replacing NULLS with space (C strings) Keith Thompson <kst-u@mib.org> - 2012-02-09 17:27 -0800
Re: Replacing NULLS with space (C strings) Kaz Kylheku <kaz@kylheku.com> - 2012-02-10 02:05 +0000
Re: Replacing NULLS with space (C strings) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-10 05:43 -0800
Re: Replacing NULLS with space (C strings) Shao Miller <sha0.miller@gmail.com> - 2012-02-10 00:27 -0500
Re: Replacing NULLS with space (C strings) Kenneth Brody <kenbrody@spamcop.net> - 2012-02-10 11:42 -0500
Re: Replacing NULLS with space (C strings) John Gordon <gordon@panix.com> - 2012-02-10 16:51 +0000
Re: Replacing NULLS with space (C strings) "christian.bau" <christian.bau@cbau.wanadoo.co.uk> - 2012-02-14 14:48 -0800
Re: Replacing NULLS with space (C strings) Keith Thompson <kst-u@mib.org> - 2012-02-09 13:22 -0800
Re: Replacing NULLS with space (C strings) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-02-09 14:41 -0800
Re: Replacing NULLS with space (C strings) Kenneth Brody <kenbrody@spamcop.net> - 2012-02-10 11:48 -0500
Re: Replacing NULLS with space (C strings) Keith Thompson <kst-u@mib.org> - 2012-02-10 11:08 -0800
Re: Replacing NULLS with space (C strings) Shao Miller <sha0.miller@gmail.com> - 2012-02-10 22:36 -0500
csiph-web