lib/Face/Util/StringUtils.php
public static function subStringAfterLast($haystack, $needle, $n = 1)
    {
        $string = "";
        while ($n>0) {
            $string .= substr($haystack, strrpos($haystack, $needle) + 1);
            if($n>1){
                $string = $needle . $string;
            }
            $n--;
        }
        return $string;
    }
public static function subStringAfterLast($haystack, $needle, $n = 1)
    {
        $string = "";
        while ($n>0) {
            $string .= substr($haystack, strrpos($haystack, $needle) + 1);
            if($n>1){
                $string = $needle . $string;
            }
            $n--;
        }
        return $string;
    }
public static function subStringAfterLast ( $ haystack , $ needle , $ n = 1 ) { $ string = "" ; while ( $ n > 0 ) { $ string .= substr ( $ haystack , strrpos ( $ haystack , $ needle ) + 1 ) ; if ( $ n > 1 ) { $ string = $ needle . $ string ; } $ n -- ; } return $ string ; }
Get the substring after the last occurrence of a character
@param $haystack
@param $needle
@param int $n
@return string
TODO : tests suit
Get the substring after the last occurrence of a character