[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Quick C problem



Michael Beattie <mike@omnic.dhis.org> writes:

   String1: "<user@isp.com>"

   want String2: "user@isp.com"

If you really know that String1 is formatted that way:

   strcpy (String2, String1 + 1);
   String2[strlen (String2) - 1] = '\0';

But in real-world code you'd have to validate the contents of String1
first.

P.S. In the future comp.lang.c is a better place for this sort of
question.  I'm a regular there, too.


Reply to: