<commit_before>#include <stdlib.h>
#include <stdio.h>
#include <string.h>

/*
  Null terminates first word, and returns a pointer to the start of the next word
*/
char* find_next_word (char *str) {
    while ((*str >= 'a' && *str <= 'z') || (*str >= 'A' && *str <= 'Z') || *str == '\'') {
        str++;
    }
    *str = '\0';
    return ++str;
}
<commit_msg>better find next word<commit_after>#include <stdlib.h>
#include <stdio.h>
#include <string.h>

/*
  Null terminates first word, and returns a pointer to the start of the next word
*/
char* find_next_word (char *str) {
    while ((*str >= 'a' && *str <= 'z') || (*str >= 'A' && *str <= 'Z') || *str == '\'') {
        str++;
    }
    *str = '\0'; // Found end of first word
    while (!((*str >= 'a' && *str <= 'z') || (*str >= 'A' && *str <= 'Z') || *str == '\'')) {
        str++;
    }
    return str; // Found begining of second word
}

{'fraction_non_alphanumeric': 0.23692992213570635, 'fraction_numerical': 0.002224694104560623, 'mean_word_length': 2.71900826446281, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3772240', 'n_tokens_mistral': 332, 'n_tokens_neox': 326, 'n_words': 104}