Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/libbb/trim.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/libbb/trim.c
r821 r1770 9 9 */ 10 10 11 #include <stdio.h>12 #include <string.h>13 #include <ctype.h>14 11 #include "libbb.h" 15 16 12 17 13 void trim(char *s) … … 24 20 25 21 /* trim leading whitespace */ 26 if (len) {22 if (len) { 27 23 lws = strspn(s, " \n\r\t\v"); 28 24 memmove(s, s + lws, len -= lws); 29 25 } 30 s[len] = 0;26 s[len] = '\0'; 31 27 }
Note:
See TracChangeset
for help on using the changeset viewer.