Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Examples  

test_chop.c

This file shows how to use the function chop().

#include "strings_utils.h"
#include <stdio.h>

int main (int argc, char *argv[])
{
  char buff[10000];

  if (argc != 2)
  {
    fprintf (stderr, "\nUsage: chop.test string\n");
    return 1;
  }

  strcpy (buff, argv[1]);
  if (chop(buff) == NULL)
  {
    fprintf (stderr, "\nError: Not enough memory!\n");
    return 1;
  }

  fprintf (stdout, "\n\n[%s]\n\n", buff);

  return 0;
}

Generated on Thu Apr 3 16:23:40 2003 for Common_C_libraries by doxygen1.3-rc1