no, strrchr gives you the rest of the string


On Wed, Aug 28, 2013 at 4:01 PM, apt142 <notifications@github.com> wrote:

> In ^/lib/View.php:
>
> > @@ -313,6 +342,24 @@ public function render($_template = 'template') {
> >          // If we got here, we didn't find the template.
> >          return false;
> >      }
> > +
> > +    /**
> > +     * Returns a min name of a css/js file.
> > +     *
> > +     * @param string $filename File name to evaluate
> > +     *
> > +     * @return string
> > +     */
> > +    private function getFileName($filename) {
> > +        $basename = basename($filename);
> > +        $ext = substr($basename, strripos($basename, '.'), strlen($basename));
>
> strripos searches in reverse order. I'm grabbing everything from the last
> . to the end of the name.
>
> strrchr only does what sttripos does. (I'm not sure why there are two
> functions for the same thing though.)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/LoneFry/Graphite/pull/10/files#r6044519>
> .
>