@@ 66-71 (lines=6) @@ | ||
63 | * @param string $test |
|
64 | * @return bool |
|
65 | */ |
|
66 | public function endsWith($string, $test) { |
|
67 | $strlen = strlen($string); |
|
68 | $testlen = strlen($test); |
|
69 | if ($testlen > $strlen) return false; |
|
70 | return substr_compare($string, $test, $strlen - $testlen, $testlen, true) === 0; |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * @param $folder |
@@ 119-124 (lines=6) @@ | ||
116 | * @param $test |
|
117 | * @return bool |
|
118 | */ |
|
119 | public function endsWith($string, $test) { |
|
120 | $strlen = strlen($string); |
|
121 | $testlen = strlen($test); |
|
122 | if ($testlen > $strlen) return false; |
|
123 | return substr_compare($string, $test, $strlen - $testlen, $testlen, true) === 0; |
|
124 | } |
|
125 | } |