Blog_IMIE/project/assets/php/functions.php
2019-01-14 16:50:21 +01:00

12 lines
225 B
PHP

<?php
//function pour voir la fin d'un texte
function endsWith($haystack, $needle) {
$length = strlen($needle);
if ($length == 0) {
return true;
}
return (substr($haystack, -$length) === $needle);
}