CCL Home Page
Up Directory CCL nolead
#include "utility.h"

char *nolead(string,leading_char)
/*============================================================================*/
/* PURPOSE: REMOVE LEADING CHARACTERS FROM A STRING.  NOTE THAT THE ORIGINAL
/*	STRING IS NOT MODIFIED.
/* INPUTS:
/*	STRING			STRING POSSIBLY CONTAINING LEADING CHARACTERS.
/*	LEADING_CHAR		LEADING CHARACTER TO REMOVE.
/* OUTPUTS:
/*	FUNCTION VALUE		POINTER TO STRING WITH LEADING CHARACTERS
/*				REMOVED.
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 11 JUNE 1991 MVG
*/
   char string[];
   char leading_char;
   {
   int i;

   /* FIND THE FIRST NON LEADING_CHAR CHARACTER. */
   i=0;
   while (string[i++]==leading_char)
      {
      }

   return(&string[--i]);
   }
Modified: Fri Feb 11 17:00:00 1994 GMT
Page accessed 4975 times since Sat Apr 17 21:58:59 1999 GMT