Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 10 Feb 2012 16:16:59 -0600 Message-ID: <4F35975C.72BB@mindspring.com> Date: Fri, 10 Feb 2012 17:17:00 -0500 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: Right trim string function in C References: <2qqaj791gt4d2fjgtlmds1asoqll9bhq0g@4ax.com> <4F3573DB.60505@verizon.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 22 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.223.74 X-Trace: sv3-fYrGBnoW7SeajWGTj9ns8BCWkd7+lnYW02f0SlP0Y+zWWQHKECIk6/wGzS7CXXEvrvLUjxZ4ZzxT9ka!MQlj16zPELed8xrmSe3skcctO4ZFdQKs6oLhlo/wEI1XlnzN9QtlduKkzJgJBeI9dNQXTVK+tA+a!E5F9UjuKmQ== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1804 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:17087 James Kuyper wrote: > > On 02/10/2012 02:30 PM, Barry Schwarz wrote: > > On 10 Feb 2012 18:59:36 GMT, ram@zedat.fu-berlin.de (Stefan Ram) > > wrote: > > > >> peter writes: > [snipage restored:] > >>> Is there a right trim function that will remove the > >>> trailing spaces and make *str look like "Hello Dolly\0"? > ... > > Why have all the solutions so far changed all the trailing blanks to > > nuls? ... > > Because that's what the OP requested (see above). I interpreted it the way that Barry Scharwz did: that the string is the thing from which the trailing spaces should be removed. -- pete