You are here

function _filebrowser_ends_with in Filebrowser 7.4

Same name and namespace in other branches
  1. 8 filebrowser.helpers.inc \_filebrowser_ends_with()
  2. 6.2 includes/helpers.inc \_filebrowser_ends_with()
  3. 7.2 filebrowser.helpers.inc \_filebrowser_ends_with()
  4. 7.3 filebrowser.helpers.inc \_filebrowser_ends_with()

Check the end of a string

Parameters

$str source string:

$sub element to search:

Return value

return TRUE is a string ends with another string.

File

./filebrowser.helpers.inc, line 108
Misc helper functions.

Code

function _filebrowser_ends_with($str, $sub) {
  return substr($str, strlen($str) - strlen($sub)) == $sub;
}