mirror of
https://github.com/grocy/grocy.git
synced 2025-08-24 14:06:44 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user