macsim/macsim-seq.c
// Return a pointer to the first non-whitepace, 0 if empty
// Cut trailing whitespaces
Return a pointer to the first non-whitepace, 0 if empty
Cut trailing whitespaces
Return a pointer to the first non - whitepace 0 if empty Cut trailing whitespaces
char *trim_whitespace(char *line)
{
    char *s=line;
    while (*s<=32)
    {
        if (*s==0) return 0;
        s++;
    }
    char *t = s + strlen(s)-1;
    while (t>=s && *t<=32)
    {
        *t = 0;
        t--;
    }
    return s;
}
char * trim_whitespace ( char * line ) { char * s = line ; while ( * s <= 32 ) { if ( * s == 0 ) return 0 ; s ++ ; } char * t = s + strlen ( s ) - 1 ; while ( t >= s && * t <= 32 ) { * t = 0 ; t -- ; } return s ; }
Return a pointer to the first non-whitepace, 0 if empty
Cut trailing whitespaces
Return a pointer to the first non - whitepace 0 if empty Cut trailing whitespaces
// replace trailing whitespaces by 0