<commit_before>﻿namespace System
{
    using Collections.Generic;

    public static class StringExtensions
    {
        public static string Reverse(this string target)
        {
            if (target == null) return null;
            if (target == "") return "";

            var chars = target.ToCharArray();

            var left = 0;
            var right = chars.Length - 1;
            while (left < right)
            {
                chars.SwapAt(left, right);

                left += 1;
                right -= 1;
            }
            return new string(chars);
        }
    }
}<commit_msg>String.NullOrEmptyTo<commit_after>﻿namespace System
{
    using Collections.Generic;

    public static class StringExtensions
    {
        public static string Reverse(this string target)
        {
            if (target == null) return null;
            if (target == "") return "";

            var chars = target.ToCharArray();

            var left = 0;
            var right = chars.Length - 1;
            while (left < right)
            {
                chars.SwapAt(left, right);

                left += 1;
                right -= 1;
            }
            return new string(chars);
        }

        public static string NullToEmpty(this string target)
        {
            return target.NullTo(string.Empty);
        }

        public static string NullTo(this string target, string replacingValue)
        {
            return target ?? replacingValue;
        }

        public static string NullOrEmptyTo(this string target, string replacingValue)
        {
            return string.IsNullOrEmpty(target) ? target : replacingValue;
        }

        public static string NullOrWhiteSpaceTo(this string target, string replacingValue)
        {
            return string.IsNullOrWhiteSpace(target) ? target : replacingValue;
        }
    }
}
{'fraction_non_alphanumeric': 0.08315565031982942, 'fraction_numerical': 0.0042643923240938165, 'mean_word_length': 1.5160857908847185, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5098334', 'n_tokens_mistral': 479, 'n_tokens_neox': 445, 'n_words': 131}