<commit_before>// This file is intended to be included into an array of 'const char*'

#define STRING_CMP_FUNCS(op)                    \
  "(define (string"op"? s1 s2)"                 \
  "  ("op" (%string-strcmp s1 s2) 0))"
STRING_CMP_FUNCS("="),
STRING_CMP_FUNCS("<"),
STRING_CMP_FUNCS(">"),
STRING_CMP_FUNCS("<="),
STRING_CMP_FUNCS(">="),
#undef STRING_CMP_FUNCS

#define STRING_CI_CMP_FUNCS(op)                    \
  "(define (string-ci"op"? s1 s2)"                 \
  "  ("op" (%string-strcasecmp s1 s2) 0))"
STRING_CI_CMP_FUNCS("="),
STRING_CI_CMP_FUNCS("<"),
STRING_CI_CMP_FUNCS(">"),
STRING_CI_CMP_FUNCS("<="),
STRING_CI_CMP_FUNCS(">="),
#undef STRING_CI_CMP_FUNCS

"(define (substring str start end)"
"  (let* ((size (- end start))"
"         (str2 (make-string size)))"
"    (do ((i 0 (+ i 1)))"
"        ((= i size) str2)"
"      (string-set! str2 i (string-ref str (+ i start))))))",

"(define (string-copy str)"
"  (let* ((size (string-length str))"
"         (str2 (make-string size)))"
"    (do ((i 0 (+ i 1)))"
"        ((= i size) str2)"
"      (string-set! str2 i (string-ref str i)))))",

"(define (string-fill! str fill)"
"  (let ((size (string-length str)))"
"    (do ((i 0 (+ i 1)))"
"        ((= i size) str)"
"      (string-set! str i fill))))",<commit_msg>cleanup string-copy<commit_after>// This file is intended to be included into an array of 'const char*'

#define STRING_CMP_FUNCS(op)                    \
  "(define (string"op"? s1 s2)"                 \
  "  ("op" (%string-strcmp s1 s2) 0))"
STRING_CMP_FUNCS("="),
STRING_CMP_FUNCS("<"),
STRING_CMP_FUNCS(">"),
STRING_CMP_FUNCS("<="),
STRING_CMP_FUNCS(">="),
#undef STRING_CMP_FUNCS

#define STRING_CI_CMP_FUNCS(op)                    \
  "(define (string-ci"op"? s1 s2)"                 \
  "  ("op" (%string-strcasecmp s1 s2) 0))"
STRING_CI_CMP_FUNCS("="),
STRING_CI_CMP_FUNCS("<"),
STRING_CI_CMP_FUNCS(">"),
STRING_CI_CMP_FUNCS("<="),
STRING_CI_CMP_FUNCS(">="),
#undef STRING_CI_CMP_FUNCS

"(define (substring str start end)"
"  (let* ((size (- end start))"
"         (str2 (make-string size)))"
"    (do ((i 0 (+ i 1)))"
"        ((= i size) str2)"
"      (string-set! str2 i (string-ref str (+ i start))))))",

"(define (string-copy str)"
"  (substring str 0 (string-length str)))",

"(define (string-fill! str fill)"
"  (let ((size (string-length str)))"
"    (do ((i 0 (+ i 1)))"
"        ((= i size) str)"
"      (string-set! str i fill))))",
{'fraction_non_alphanumeric': 0.21182266009852216, 'fraction_numerical': 0.016420361247947456, 'mean_word_length': 3.1235194585448394, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '5418979', 'n_tokens_mistral': 981, 'n_tokens_neox': 957, 'n_words': 226}