Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for ( int i = 0; i < linesSize; i++ ) {
- token = strtok( backupArray[i], " " );
- while ( token != NULL ) {
- // Trying to get rid of punctuation
- int counter = 0;
- char *word = malloc( INPUT_SIZE * sizeof( char ) );
- int tokenLen = strlen( token );
- for ( int l = 0; l < tokenLen; l++ ) {
- if ( isalpha(token[l]) ) {
- word[counter] = token[l];
- counter++;
- }
- }
- word[ counter ] = '\0';
- wordsInLine[index] = word;
- index++;
- lineLength++;
- token = strtok(NULL, " "); // this annoys me to no end.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement