.\" part of publib .\" "@(#)publib-strutil:$Id: strrtrim.3,v 1.1.1.1 1994/02/03 17:25:30 liw Exp $" .\" .TH STRRTRIM 3 "C Programmer's Manual" Publib "C Programmer's Manual" .SH NAME strrtrim \- remove trailing whitespace .SH SYNOPSIS .nf #include char *\fBstrrtrim\fR(char *\fIs\fR); .SH DESCRIPTION \fIstrrtrim\fR removes all trailing whitespace characters from the end of a string. As whitespace is counted everything for which \fIisspace\fR(3) returns true. .SH "RETURN VALUE" \fIstrltrim\fR returns its argument. .SH EXAMPLE To remove whitespace from the end of all lines, you might do the following: .sp 1 .nf .in +5 #include int main(void) { char line[512]; while (fgets(line, sizeof(line), stdio) != NULL) { strrtrim(line); printf("%s", line); } return 0; } .in -5 .SH "SEE ALSO" publib(3), strtrim(3), strltrim(3), isspace(3) .SH AUTHOR Lars Wirzenius (lars.wirzenius@helsinki.fi)