]>
diplodocus.org Git - nmh/blob - sbr/trimcpy.c
3 * trimcpy.c -- strip leading and trailing whitespace,
4 * -- replace internal whitespace with spaces,
5 * -- then return a copy.
18 /* skip over leading whitespace */
22 /* start at the end and zap trailing whitespace */
23 for (sp
= cp
+ strlen(cp
) - 1; sp
>= cp
; sp
--) {
30 /* replace remaining whitespace with spaces */
31 for (sp
= cp
; *sp
; sp
++) {
36 /* now return a copy */