home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
MAGAZINE
/
DDJ9309.ZIP
/
NETSQL.ZIP
/
DEL_TRSP.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-08-06
|
806b
|
35 lines
/*---------------------------------------------------------------------
DESCRIPTION: Self explainatory - deletes trailing spaces from string...
Date by Description
-------- ---- -------------------------------------------------------
07/01/87 DR Made loop and len into register variables.
03/19/89 DR Fix up function for 1 character strings.
---------------------------------------------------------------------*/
#include "tests.h"
del_trsp(char *op_str)
{
register int loop;
register int len;
if ( allspace(op_str) )
{
op_str[0]=0;
}
else
{
len=strlen(op_str);
for (loop=len-1 ; loop>=0 && op_str[loop]==32 ; )
{
loop--;
}
op_str[loop+1]=EOS;
}
return(0);
}