<commit_before><?php
/*---------------------------------------------------------------------------
 * @Project: Alto CMS
 * @Project URI: http://altocms.com
 * @Description: Advanced Community Engine
 * @Version: 0.9a
 * @Copyright: Alto CMS Team
 * @License: GNU GPL v2 & MIT
 *----------------------------------------------------------------------------
 */

/**
 * Common functions for Alto CMS
 */
class AltoFunc_Main {

    static protected $sRandChars = '!#$%()*+-0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz|~';
    static protected $aMemSizeUnits = array('B', 'K', 'M', 'G', 'T', 'P');

    static public function StrUnderscore($sStr) {
        return strtolower(preg_replace('/([^A-Z])([A-Z])/', "$1_$2", $sStr));
    }

    static public function StrCamelize($sStr) {
        $aParts = explode('_', $sStr);
        $sCamelized = '';
        foreach ($aParts as $sPart) {
            $sCamelized .= ucfirst($sPart);
        }
        return $sCamelized;
    }

    static public function Str2Array($sStr, $sSeparator = ',', $bSkipEmpty = false) {
        return F::Array_Str2Array($sStr, $sSeparator, $bSkipEmpty);
    }

    static public function Str2ArrayInt($sStr, $sSeparator = ',', $bUnique = true) {
        return F::Array_Str2ArrayInt($sStr, $sSeparator, $bUnique);
    }

    static public function Val2Array($xVal, $sSeparator = ',', $bSkipEmpty = false) {
        return F::Array_Val2Array($xVal, $sSeparator, $bSkipEmpty);
    }

    /**<commit_msg>убраны небуквенноцифровые символы из генерации "соли"<commit_after><?php
/*---------------------------------------------------------------------------
 * @Project: Alto CMS
 * @Project URI: http://altocms.com
 * @Description: Advanced Community Engine
 * @Version: 0.9a
 * @Copyright: Alto CMS Team
 * @License: GNU GPL v2 & MIT
 *----------------------------------------------------------------------------
 */

/**
 * Common functions for Alto CMS
 */
class AltoFunc_Main {

    static protected $sRandChars = '0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
    static protected $aMemSizeUnits = array('B', 'K', 'M', 'G', 'T', 'P');

    static public function StrUnderscore($sStr) {
        return strtolower(preg_replace('/([^A-Z])([A-Z])/', "$1_$2", $sStr));
    }

    static public function StrCamelize($sStr) {
        $aParts = explode('_', $sStr);
        $sCamelized = '';
        foreach ($aParts as $sPart) {
            $sCamelized .= ucfirst($sPart);
        }
        return $sCamelized;
    }

    static public function Str2Array($sStr, $sSeparator = ',', $bSkipEmpty = false) {
        return F::Array_Str2Array($sStr, $sSeparator, $bSkipEmpty);
    }

    static public function Str2ArrayInt($sStr, $sSeparator = ',', $bUnique = true) {
        return F::Array_Str2ArrayInt($sStr, $sSeparator, $bUnique);
    }

    static public function Val2Array($xVal, $sSeparator = ',', $bSkipEmpty = false) {
        return F::Array_Val2Array($xVal, $sSeparator, $bSkipEmpty);
    }

    /**
{'fraction_non_alphanumeric': 0.24585818422796554, 'fraction_numerical': 0.013916500994035786, 'mean_word_length': 2.2637837837837838, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '951793', 'n_tokens_mistral': 1000, 'n_tokens_neox': 965, 'n_words': 203}