Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #16992 > unrolled thread
| Started by | peter <pc722@nospam.mail.com.br> |
|---|---|
| First post | 2012-02-09 20:19 +0000 |
| Last post | 2012-02-10 22:36 -0500 |
| Articles | 1 on this page of 21 — 11 participants |
Back to article view | Back to comp.lang.c
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
Page 2 of 2 — ← Prev page 1 [2]
| From | Shao Miller <sha0.miller@gmail.com> |
|---|---|
| Date | 2012-02-10 22:36 -0500 |
| Message-ID | <jh4nh3$d5u$1@dont-email.me> |
| In reply to | #17075 |
On 2/10/2012 14:08, Keith Thompson wrote:
> peter<pc722@nospam.mail.com.br> writes:
>> In fact, I want to remove all NULLS and EOFs (0x1a)
>
> NULs and control-Zs
>
>> from a string
>
> from a buffer
>
>> then replace them all with spaces. The way I do it
>> now is by using a for() loop:
>>
>> for(temp=0;temp<=strlen(buffer);temp++)
>> {
>> if(buffer[temp]== '\0' || buffer[temp]==0x1A)
>> {buffer[temp]=' ';}
>> }
>>
>> Is there a faster / more efficient way of doing this?
>
> It's probably a good idea to investigate how those bytes got into
> your buffer in the first place. Where did the data come from?
>
So far, we haven't seen much in the way of follow-ups from peter.
Multiple people have asked about the books regarding "pointer versus
array," but the lack of a peter-response doesn't prevent people from
continuing to invest time in responses to peter's queries, which is
fortunate for peter. :)
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.c
csiph-web