<commit_before>define(function() {
    "use strict";

    var StringHelper = (function() {
        return {
            /*
                @function convertToCamelCase

                Converts the specified snake-cased string to camel case.

                @param {string} string      The desired string

                @return {string}
            */
            convertToCamelCase: function(string) {
                return string.replace(/(\_\w)/g, function($1) { return $1[1].toUpperCase(); });
            },

            /*
                @function convertToSnakeCase

                Converts the specified camel-cased string to snake case.

                @param {string} string      The desired string

                @return {string}
            */
            convertToSnakeCase: function(string) {
                return string.replace(/([A-Z])/g, function($1) { return "_" + $1.toLowerCase(); });
            },

            /*
                @function lowercaseFirst

                Converts the first character of the string to lower case.

                @param {string} string      The desired string

                @return {string}
            */
            lowercaseFirst: function(string) {
                return string.charAt(0).toLowerCase() + string.substring(1);
            },

            /*
                @function uppercaseFirst

                Converts the first character of the string to upper case.<commit_msg>Util.StringHelper: fixed issue with convertToSnakeCase() method,<commit_after>define(function() {
    "use strict";

    var StringHelper = (function() {
        return {
            /*
                @function convertToCamelCase

                Converts the specified snake-cased string to camel case.

                @param {string} string      The desired string

                @return {string}
            */
            convertToCamelCase: function(string) {
                return string.replace(/(\_\w)/g, function($1) { return $1[1].toUpperCase(); });
            },

            /*
                @function convertToSnakeCase

                Converts the specified camel-cased string to snake case.

                @param {string} string      The desired string

                @return {string}
            */
            convertToSnakeCase: function(string) {
                var ret = string.replace(/([A-Z])/g, function($1) { return "_" + $1.toLowerCase(); });

                if (ret.charAt(0) === "_") {
                    ret = ret.substring(1, 2).toLowerCase() + ret.substring(2);
                }

                return ret;
            },

            /*
                @function lowercaseFirst

                Converts the first character of the string to lower case.

                @param {string} string      The desired string

                @return {string}
            */
            lowercaseFirst: function(string) {
                return string.charAt(0).toLowerCase() + string.substring(1);
            },

            /*
                @function uppercaseFirst

                Converts the first character of the string to upper case.
{'fraction_non_alphanumeric': 0.09608654152083997, 'fraction_numerical': 0.005727012408526885, 'mean_word_length': 1.3621337340345605, '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': '6033065', 'n_tokens_mistral': 784, 'n_tokens_neox': 722, 'n_words': 201}