Next: , Previous: str_join, Up: Strings   [Contents]


4.3 str_prune

remove leading and trailing white space from a string

Synopsis

#include <suplib/str.h>

char *str_prune(char *str);

Parameters

char *str

the string to modify

Description

str_prune removes leading and trailing white space from a string. It truncates the string at the first trailing white space, then moves the string to the left, starting at the first non-white space character. The input string is modified.

Returns

It returns the pointer which it was passed.

Author

Diab Jerius