<commit_before>package com.github.kvnxiao.kommandant.utility;

/**
 * As of Kotlin 1.10, there is still some performance overhead in splitting strings by a literal.
 * As such, string splitting in Java is currently still more performant than in Kotlin.
 */
public class StringSplitter {

    public static String[] split(String str, String regex, int limit) {
        return str.split(regex, limit);
    }

    public static String[] split(String str, String regex) {
        return str.split(regex);
    }

    public static final String SPACE_LITERAL = " ";

    public static final char SPACE_CHAR = ' ';

}<commit_msg>added documentation for StringSplitter class<commit_after>package com.github.kvnxiao.kommandant.utility;

/**
 * As of Kotlin 1.10, there is still some performance overhead in splitting strings by a literal.
 * As such, string splitting in Java is currently still more performant than in Kotlin.
 */
public class StringSplitter {

    /**
     * Java string split method.
     * @param str The string to split.
     * @param regex The regex pattern in string form.
     * @param limit The maximum number of substrings to split into.
     * @return A string array of the original string split by the provided regex and limit.
     */
    public static String[] split(String str, String regex, int limit) {
        return str.split(regex, limit);
    }

    /**
     * Java string split method with no limit.
     * @param str The string to split.
     * @param regex The regex pattern in string form.
     * @return A string array of the original string split by the provided regex.
     */
    public static String[] split(String str, String regex) {
        return str.split(regex);
    }

    /**
     * Single space character in String form.
     */
    public static final String SPACE_LITERAL = " ";

    /**
     * Single space character.
     */
    public static final char SPACE_CHAR = ' ';

}
{'fraction_non_alphanumeric': 0.0816008316008316, 'fraction_numerical': 0.0031185031185031187, 'mean_word_length': 2.8346613545816735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6651865', 'n_tokens_mistral': 521, 'n_tokens_neox': 509, 'n_words': 222}