#include <exec/types.h>
#include <string.h>
#include <stdio.h>

#include <proto/dlg.h>

void StripQuote(char *);

void StripQuote(char *string)
{
   char *s;
   long  len;

   // strip leading quote
   for(s = string; *s == '"'; s++);
   len = strlen(s);

   // Offset the string ONLY if a quote was found

   if(s != string)
      movmem(s, string, len+1);

   // Now trim off the trailing quote

   if (len)
   {
      for(s = string + len - 1; *s == '"'; s--);
      s++;
      *s = 0;
   }

   return;
}


