From 4ea0d23f37f40d9afcb14f6ee7d070f3eb09813b Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 7 Dec 2018 02:04:16 +0300 Subject: [PATCH] Themes: New private method _strrevpos() - added --- flextype/Themes.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flextype/Themes.php b/flextype/Themes.php index 8aeadfde..db1f3764 100644 --- a/flextype/Themes.php +++ b/flextype/Themes.php @@ -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. *