/***************************************************************************
 *                                                                         *
 *   STRPLN.C                                                              *
 *                                                                         *
 *   Copyright (c) 1987-1997 Galacticomm, Inc.    All Rights Reserved.     *
 *                                                                         *
 *   This is the GCOMM.LIB routine for determining the printable length    *
 *   of a string (also may be thought of as the "stripped" length).        *
 *                                                                         *
 *                                            - T. Stryker 2/18/92         *
 *                                                                         *
 ***************************************************************************/

#include "gcomm.h"

#define FILREV "$Revision: 5 $"

INT                                /*   returns length of string           */
strpln(                            /* computes len of stg w/o spaces or ^Z */
const CHAR *string)                /*   string to examine                  */
{
     INT n;

     for (n=strlen(string),string+=n ; n > 0 ; n--) {
          string--;
          if (!isspace(*string) && *string != 'Z'-64) {
               break;
          }
     }
     return(n);
}
