Internal change that the demo instances (stable and pre-release) can be served through a single instance for all localizations (references #241)

This commit is contained in:
Bernd Bestel
2019-09-21 15:07:29 +02:00
parent 6e4117526b
commit d8360993cc
14 changed files with 65 additions and 22 deletions

View File

@@ -220,3 +220,19 @@ function IsJsonString($text)
json_decode($text);
return (json_last_error() == JSON_ERROR_NONE);
}
function string_starts_with($haystack, $needle)
{
return (substr($haystack, 0, strlen($needle)) === $needle);
}
function string_ends_with($haystack, $needle)
{
$length = strlen($needle);
if ($length == 0)
{
return true;
}
return (substr($haystack, -$length) === $needle);
}