You are here

function _startsWith in Media crop 7

Helper function for checking if a string starts with a substring.

1 call to _startsWith()
media_crop_media_token_to_markup_alter in ./media_crop.module
Implements hook_media_token_to_markup_alter().

File

./media_crop.module, line 1135
Media crop primary module file.

Code

function _startsWith($haystack, $needle) {
  $length = strlen($needle);
  return substr($haystack, 0, $length) === $needle;
}