[ create a new paste ] login | about

Link: http://codepad.org/G2fwwjSS    [ raw code | fork ]

C, pasted on Jan 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void remove_leading_whitespace(char *buffer)
{
        char *pos;

        pos = buffer;

        while (*pos && isspace(*pos))
        {
                pos++;
        }

        printf("pos-after: %s \n", pos);
        printf("buffer-after: %s \n", buffer);

        strcpy(buffer, pos);

        printf("buff: %s \n", buffer);
}


Create a new paste based on this one


Comments: