mirror of
https://github.com/flextype/flextype.git
synced 2025-08-09 06:36:52 +02:00
Themes: New private method _strrevpos() - added
This commit is contained in:
@@ -115,6 +115,19 @@ class Themes
|
||||
return new View($template, $variables);
|
||||
}
|
||||
|
||||
/**
|
||||
* _strrevpos
|
||||
*/
|
||||
private static function _strrevpos($instr, $needle)
|
||||
{
|
||||
$rev_pos = strpos(strrev($instr), strrev($needle));
|
||||
if ($rev_pos === false) {
|
||||
return false;
|
||||
} else {
|
||||
return strlen($instr) - $rev_pos - strlen($needle);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Themes instance.
|
||||
*
|
||||
|
Reference in New Issue
Block a user