<commit_before>﻿using System;

namespace Vovin.CmcLibNet.Extensions
{
    /// <summary>
    /// String extension methods
    /// </summary>
    internal static class StringExtensions
    {
        ///// <summary>
        ///// Returns number of occurrences of a character in a string
        ///// </summary>
        ///// <param name="str">String to search in.</param>
        ///// <param name="c">Character to count.</param>
        ///// <returns></returns>
        //internal static int Count(this string str, char c)
        //{
        //    int counter = 0;
        //    foreach (char x in str)
        //    {
        //        if (x == c) { counter++; }
        //    }
        //    return counter;
        //}

        ///// <summary>
        ///// Returns Nth index of character in a string
        ///// </summary>
        ///// <param name="input">String to search in</param>
        ///// <param name="value">String to search for</param>
        ///// <param name="startIndex">Start index</param>
        ///// <param name="nth">Nth occurrence</param>
        ///// <returns></returns>
        ///// <exception cref="NotSupportedException"></exception>
        //internal static int IndexOfNthChar(this string input, char value, int startIndex, int nth) // TODO this is not doing what I intended it to do
        //{
        //    if (nth < 1)
        //        throw new NotSupportedException("Param 'nth' must be greater than 0!");
        //    if (nth == 1)
        //        return input.IndexOf(value, startIndex);

        //    return input.IndexOfNthChar(value, input.IndexOf(value, startIndex) + 1, --nth);
        //}

        /// <summary>
        /// Surround string with character.<commit_msg>removed clutter<commit_after>﻿using System;

namespace Vovin.CmcLibNet.Extensions
{
    /// <summary>
    /// String extension methods
    /// </summary>
    internal static class StringExtensions
    {
        /// <summary>
        /// Surround string with character.
{'fraction_non_alphanumeric': 0.1576305220883534, 'fraction_numerical': 0.0025100401606425703, 'mean_word_length': 1.6397350993377484, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 31, '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': '5203399', 'n_tokens_mistral': 551, 'n_tokens_neox': 540, 'n_words': 156}