--- trunk/OOPSE-1.0/libmdtools/StringUtils.c 2004/07/27 16:13:29 1418 +++ trunk/OOPSE-1.0/libmdtools/StringUtils.c 2004/07/27 18:14:16 1419 @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include "simError.h" #include "StringUtils.h" @@ -89,27 +91,6 @@ int isEndLine(char *line) { return 0; } - -int count_tokens(char *line, char *delimiters) { - /* PURPOSE: RETURN A COUNT OF THE NUMBER OF TOKENS ON THE LINE. */ - - char *working_line; /* WORKING COPY OF LINE. */ - int ntokens; /* NUMBER OF TOKENS FOUND IN LINE. */ - char *strtok_ptr; /* POINTER FOR STRTOK. */ - - strtok_ptr= working_line= strdup(line); - - ntokens=0; - while (strtok(strtok_ptr,delimiters)!=NULL) - { - ntokens++; - strtok_ptr=NULL; - } - - free(working_line); - return(ntokens); -} - /** * Removes left and right spaces from a string *