src/struct.c
//deletes blank spaces after a given string
deletes blank spaces after a given string
deletes blank spaces after a given string
void trimTrailing(char * str){ 
    int index, i;
    index = -1;
    i = 0;
    while(str[i] != '\0')
    {
        if(str[i] != ' ' && str[i] != '\t' && str[i] != '\n')
        {
            index= i;
        }
        i++;
    }
    str[index + 1] = '\0';
}
void trimTrailing ( char * str ) { int index , i ; index = -1 ; i = 0 ; while ( str [ i ] != ' \0 ' ) { if ( str [ i ] != ' ' && str [ i ] != ' \t ' && str [ i ] != ' \n ' ) { index = i ; } i ++ ; } str [ index + 1 ] = ' \0 ' ; }
deletes blank spaces after a given string
deletes blank spaces after a given string
/* Set default index */ /* Find last index of non-white space character */ /* Mark next character to last non-white space character as NULL */