<commit_before>﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UtilityLibraries
{
    /// <summary>
    /// Static class that offers universal functions with Strings for .NET Standard Platform (Continuous updating class)
    /// </summary>
    public static class StringLibrary
    {
        /// <summary>
        /// Checks and returns true if the string starts with Upper letter
        /// </summary>
        /// <param name="str">String to check</param>
        /// <returns>bool</returns>
        public static bool StartsWithUpper(this String str)
        {
            if (String.IsNullOrWhiteSpace(str))
                return false;

            Char ch = str[0];
            return (Char.IsUpper(ch));
        }
    }
}
<commit_msg>Add new function<commit_after>﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UtilityLibraries
{
    /// <summary>
    /// Static class that offers universal functions with Strings for .NET Standard Platform (Continuous updating class)
    /// </summary>
    public static class StringLibrary
    {
        /// <summary>
        /// Checks and returns true if the string starts with Upper letter
        /// </summary>
        /// <param name="str">String to check</param>
        /// <returns>bool</returns>
        public static bool StartsWithUpper(this String str)
        {
            if (String.IsNullOrWhiteSpace(str))
                return false;

            Char ch = str[0];
            return (Char.IsUpper(ch));
        }

        /// <summary>
        /// Returns a random string from a list
        /// </summary>
        /// <param name="lsWords">String list</param>
        /// <returns>String</returns>
        public static String randomWord(List<String> lsWords)
        {
            if (lsWords == null || lsWords.Count <= 0)
                return "";
            Random R = new Random();            
            return lsWords[R.Next(0, lsWords.Count - 1)];
        }



    }
}

{'fraction_non_alphanumeric': 0.11548033847685416, 'fraction_numerical': 0.0024888003982080635, 'mean_word_length': 1.8389830508474576, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 26, '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': '4130674', 'n_tokens_mistral': 533, 'n_tokens_neox': 510, 'n_words': 158}