Tag

Trimming

Browsing

Reading a file or any output stream usually comes back with leading to trailing whitespace. The following code snippet removes any whitespace on the left of a c string. char * str_ltrim(char * _arg) { if (_arg == NULL)return NULL; int i = 0, size = 0, j = 0; char * result; size =…