public static function snakeCase($val, string $sep = '_'): string
    {
        if (!$val || !\is_string($val)) {
            return '';
        }

        $val = \preg_replace('/([A-Z][a-z])/', $sep . '$1', $val);

        return self::lowercase(\trim($val, $sep));
    }