public function ExifPHPExtension::startswith in Exif 8
Same name and namespace in other branches
- 8.2 src/ExifPHPExtension.php \Drupal\exif\ExifPHPExtension::startswith()
- 7 ExifPHPExtension.php \Drupal\exif\ExifPHPExtension::startswith()
Helper function to know if a substring start a string.
Used internally and in help page (so should be public).
Parameters
string $hay: The string where we look for.
string $needle: The string to look for.
Return value
bool if condition is valid.
1 call to ExifPHPExtension::startswith()
- ExifPHPExtension::reformat in src/
ExifPHPExtension.php - Helper function to reformat fields where required.
File
- src/
ExifPHPExtension.php, line 514
Class
- ExifPHPExtension
- Class ExifPHPExtension Parser implementation base d on PHP Exif extension.
Namespace
Drupal\exifCode
public function startswith($hay, $needle) {
return substr($hay, 0, strlen($needle)) === $needle;
}