strip_whitespace

svn path=/trunk/boinc/; revision=1191
This commit is contained in:
Eric Heien 2003-05-13 23:10:06 +00:00
parent f8b5f68bc1
commit 87cbf8fe47
2 changed files with 13 additions and 0 deletions

View File

@ -248,6 +248,18 @@ void c2x(char *what) {
strcpy(what, buf);
}
void strip_whitespace(char *str) {
int read_pos, write_pos;
read_pos = write_pos = 0;
while(str[read_pos] != 0) {
if (!isspace(str[read_pos])) {
str[write_pos] = str[read_pos];
write_pos++;
}
read_pos++;
}
}
void unescape_url(char *url) {
register int x,y;

View File

@ -26,6 +26,7 @@ extern int parse_command_line( char *, char ** );
extern int lock_file(char*);
extern double drand();
extern void c2x(char *what);
extern void strip_whitespace(char *str);
extern void unescape_url(char *url);
extern void escape_url(char *in, char*out);
extern void safe_strncpy(char*, char*, int);