2020-04-26 15:08:26 +01:00
|
|
|
<?php
|
2020-04-27 08:57:13 +01:00
|
|
|
|
|
|
|
namespace AppInstaller;
|
|
|
|
|
2020-04-26 15:08:26 +01:00
|
|
|
function ends_with($stringToCheck, $stringToFind)
|
|
|
|
{
|
|
|
|
return strlen($stringToCheck) >= strlen($stringToFind) &&
|
|
|
|
substr(strtolower($stringToCheck), strlen($stringToCheck) - strlen($stringToFind), strlen($stringToFind)) == strtolower($stringToFind);
|
|
|
|
}
|
|
|
|
|
|
|
|
function starts_with($stringToCheck, $stringToFind)
|
|
|
|
{
|
|
|
|
return strlen($stringToCheck) >= strlen($stringToFind) &&
|
|
|
|
substr(strtolower($stringToCheck), 0, strlen($stringToFind)) == strtolower($stringToFind);
|
|
|
|
}
|