even easier... string[strlen(string)-1] = '\0'; Your method could over-bound the string and blow up if the '\n' is missing.
----- Original Message ----- From: "Max Bian" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Friday, January 04, 2002 9:02 AM Subject: Re: String without \n...... > StrChr is the function you may need. > > Or simply: > > char *strP = String; > while(*strP != '\n') strP++ > *strP = '\0'; > > Max > --- palm <[EMAIL PROTECTED]> wrote: > > Hi > > > > I've got following problem: > > > > the string which I get back form a routine has a \n at the end....but I need > > a \0 for my search. > > e.g. "00000103\n" -> "00000103\0" > > > > Thanks. > > > > Sebastian > > > > > > > > -- > > For information on using the Palm Developer Forums, or to unsubscribe, please > > see http://www.palmos.com/dev/tech/support/forums/ > > > ===== > -=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=- > Got Palm? > Get ExBox at http://www.weirdwww.com/ExBox to beam anything! > > __________________________________________________ > Do You Yahoo!? > Send your FREE holiday greetings online! > http://greetings.yahoo.com > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
