| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Snippets ini.c |
From: rbs{at}snippets.org
To: c_echo{at}yahoogroups.com
To: rbs{at}snippets.org (Bob Stout)
Copy: c_echo{at}yahoogroups.com
Copy: tomtorfs{at}village.uunet.be
Quoting Bob Stout :
> I'll fix #3 for rmtrail.c this weekend... ;-)
It didn't take that long, after all... ;-) Along the way, I totally eliminated
the strlen() call.
----[ snip ]----
#include
#include
char *rmtrail(char *str)
{
int i;
if (!str)
return NULL;
for (i = 0; str[i]; ++i)
;
for (--i; i >= 0 && isspace(str[i]); --i)
;
str[++i] = NUL;
return str;
}
----[ snip ]----
I already updated it in SNIPPETS...
-------------------------------------------------------------
Consulting: http://www.MicroFirm.biz/
Web graphics development: http://Image-Magicians.com/
Software archives: http://snippets.snippets.org/
c.snippets.org/ cpp.snippets.org/ java.snippets.org/
d.snippets.org/ python.snippets.org/ perl.snippets.org/
dos.snippets.org/ embedded.snippets.org/ apps.snippets.org/
Audio and loudspeaker design:
http://LDSG.snippets.org/ http://www.diyspeakers.net/
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- SoupGate-Win32 v1.05
* Origin: rbs{at}snippets.org (2:292/516.666)SEEN-BY: 633/267 270 @PATH: 292/516 854 140/1 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.