/***************************************************************************
 *                                                                         *
 *   STRSTP.C                                                              *
 *                                                                         *
 *   Copyright (c) 1994-1997 Galacticomm, Inc.  All Rights Reserved.       *
 *                                                                         *
 *   This is the GCOMM.LIB routine for stripping a character from a        *
 *   NUL-terminated string.  Converts in-place and returns the string      *
 *   that was passed.                                                      *
 *                                                                         *
 *                                                  - R. Stein 7/24/94     *
 *                                                                         *
 ***************************************************************************/

#include "gcomm.h"

#define FILREV "$Revision: 4 $"

CHAR *                             /*   returns ptr to string              */
strstp(                            /* strip a character from a string      */
CHAR *str,                         /*   stg to strip from, NUL-terminated  */
CHAR ch)                           /*   character to strip (0x01 to 0xFF)  */
{
     CHAR *cp;

     for (cp=str; (cp=strchr(cp,ch)) != NULL ; strcpy(cp,cp+1)) {
     }
     return(str);
}
