public static function countChars(string $text, bool $includeSpaces = false): int
    {
        if ($includeSpaces === false) {
            $text = preg_replace("/[\s]/", '', $text);
        }
        return mb_strlen($text);
    }