src/Utilities/Regex.php
public static function endsWithDirectorySeparator($text, $separator = '')
    {
        if (empty($separator)) {
            $separator = DIRECTORY_SEPARATOR;
        }

        return self::endsWith($text, $separator);
    }
public static function endsWithDirectorySeparator($text, $separator = '')
    {
        if (empty($separator)) {
            $separator = DIRECTORY_SEPARATOR;
        }

        return self::endsWith($text, $separator);
    }
public static function endsWithDirectorySeparator ( $ text , $ separator = '' ) { if ( empty ( $ separator ) ) { $ separator = DIRECTORY_SEPARATOR ; } return self :: endsWith ( $ text , $ separator ) ; }
Returns information if the string ends with directory's separator

@param string $text      String that may contain a directory's separator at the end
@param string $separator (optional) The directory's separator, e.g. "/". If is empty (not provided), system's
separator is used.
@return string
Returns information if the string ends with directory s separator