Files
godot-question2answer/qa-plugin/q2a-code-prettify/qa-code-prettify-utils.php
Emi 07ec659385 Importing project into Git
This project lived only on the server without version control. This is now the starting point for the repository.
2023-05-23 20:03:24 +02:00

20 lines
386 B
PHP

<?php
if (!function_exists('starts_with')) {
function starts_with($haystack, $needle)
{
return $needle === "" || strpos($haystack, $needle) === 0;
}
}
if (!function_exists('ends_with')) {
function ends_with($haystack, $needle)
{
return $needle === "" || substr($haystack, -strlen($needle)) === $needle;
}
}
/*
Omit PHP closing tag to help avoid accidental output
*/