PDF rausgenommen

This commit is contained in:
aschwarz
2023-01-23 11:03:31 +01:00
parent 82d562a322
commit a6523903eb
28078 changed files with 4247552 additions and 2 deletions

View File

@ -0,0 +1,25 @@
<?php
/**
* Class AMP_String_Utils
*
* @package AMP
*/
/**
* Class with static string utility methods.
*/
class AMP_String_Utils {
/**
* Checks whether a given string ends in the given substring.
*
* @param string $haystack Input string.
* @param string $needle Substring to look for at the end of $haystack.
* @return bool True if $haystack ends in $needle, false otherwise.
*/
public static function endswith( $haystack, $needle ) {
return '' !== $haystack
&& '' !== $needle
&& substr( $haystack, -strlen( $needle ) ) === $needle;
}
}