You are here

function endsWith in Entity Reference Hierarchy 8

File

./entity_hierarchy.module, line 362
A module to make nodes hierarchical.

Code

function endsWith($haystack, $needle) {

  // search forward starting from end minus needle length characters
  return $needle === "" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE;
}