components/prboom/d_deh.c
// ====================================================================
// lfstrip
// Purpose: Strips CR/LF off the end of a string
// Args:    s -- the string to work on
// Returns: void -- the string is modified in place
//
// killough 10/98: only strip at end of line, not entire string
lfstrip
Purpose: Strips CR/LF off the end of a string
Args:    s -- the string to work on
Returns: void -- the string is modified in place

killough 10/98: only strip at end of line, not entire string
lfstrip Purpose : Strips CR / LF off the end of a string Args : s -- the string to work on Returns : void -- the string is modified in place killough 10 / 98 : only strip at end of line not entire string
void lfstrip(char *s)  
{
  char *p = s+strlen(s);
  while (p > s && (*--p=='\r' || *p=='\n'))
    *p = 0;
}
void lfstrip ( char * s ) { char * p = s + strlen ( s ) ; while ( p > s && ( * -- p == ' \r ' || * p == ' \n ' ) ) * p = 0 ; }
lfstrip
Purpose: Strips CR/LF off the end of a string
Args:    s -- the string to work on
Returns: void -- the string is modified in place
lfstrip Purpose : Strips CR / LF off the end of a string Args : s -- the string to work on Returns : void -- the string is modified in place
// strip the \r and/or \n off of a line