public static function cutStart(
        string $str,
        string $subString = ' ',
        bool $repeat = false,
        bool $caseSensitive = true
    ) : string {
        $prepared = RegEx::prepare($subString, '/');
        $regex = sprintf(
            '/^%s/%s',
            ($subString
                ? ($repeat ? RegexHelper::quantifyGroup($prepared, 0) : $prepared)
                : ''
            ),
            (!$caseSensitive ? 'i' : '')
        );

        return preg_replace($regex, '', $str);
    }
public static function cutStart(
        string $str,
        string $subString = ' ',
        bool $repeat = false,
        bool $caseSensitive = true
    ) : string {
        $prepared = RegEx::prepare($subString, '/');
        $regex = sprintf(
            '/^%s/%s',
            ($subString
                ? ($repeat ? RegexHelper::quantifyGroup($prepared, 0) : $prepared)
                : ''
            ),
            (!$caseSensitive ? 'i' : '')
        );

        return preg_replace($regex, '', $str);
    }
public static function cutStart ( string $ str , string $ subString = ' ' , bool $ repeat = false , bool $ caseSensitive = true ) : string { $ prepared = RegEx :: prepare ( $ subString , '/' ) ; $ regex = sprintf ( '/^%s/%s' , ( $ subString ? ( $ repeat ? RegexHelper :: quantifyGroup ( $ prepared , 0 ) : $ prepared ) : '' ) , ( ! $ caseSensitive ? 'i' : '' ) ) ; return preg_replace ( $ regex , '' , $ str ) ; }
Cut substring from the beginning of string

@param string $str
@param string $subString
@param bool   $repeat
@param bool   $caseSensitive     Not working with multi-byte characters

@return string
Cut substring from the beginning of string