<commit_before>include base.comparator.BaseComparator
include string.validator.StringValidator

StringUtil(){
	capitalize(){
		local str=${@}

		echo ${str^}
	}

	length(){
		str=${@}

		echo ${#str}
	}

	replace(){
		local str=${1}
		local orig=${2}
		local new=${3}

		if [[ $(BaseComparator isEqual ${orig} space) ]]; then
			orig=" "
		fi

		if [[ $(BaseComparator isEqual ${new} space) ]]; then
			new=" "
		fi
<commit_msg>Add util to append character to previous string<commit_after>include base.comparator.BaseComparator
include string.validator.StringValidator

StringUtil(){
	append(){
		echo ${1}${2}
	}

	capitalize(){
		local str=${@}

		echo ${str^}
	}

	length(){
		str=${@}

		echo ${#str}
	}

	replace(){
		local str=${1}
		local orig=${2}
		local new=${3}

		if [[ $(BaseComparator isEqual ${orig} space) ]]; then
			orig=" "
		fi

		if [[ $(BaseComparator isEqual ${new} space) ]]; then
			new=" "
		fi

{'fraction_non_alphanumeric': 0.18241042345276873, 'fraction_numerical': 0.008686210640608035, 'mean_word_length': 3.7282051282051283, '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': '7223161', 'n_tokens_mistral': 364, 'n_tokens_neox': 327, 'n_words': 84}