public static function repeat($str, $repeat, $separator = null)
    {
        $result = self::EMPTY_STR;

        if ((null === $str) || (null === $separator)) {
            $result = \str_repeat($str, $repeat);
        } else {
            $result = \str_repeat($str . $separator, $repeat);

            if (true === self::isNotEmpty($str)) {
                $result = self::removeEnd($result, $separator);
            }
        }

        return $result;
    }