Next: , Previous: str_trim, Up: Strings


4.19 str_trunc

truncate white space at the end of a string

Synopsis

     #include <suplib/str.h>
     
     
     
char *str_trunc(char *string);

Parameters

char *string
the string to truncate

Description

str_trunc truncates white space at the end of a string by writing a ‘\0’ at the appropriate position in the string. It alters the passed string.

Returns

It returns the pointer which it was passed.

Author

Diab Jerius