| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/ravel.network/public/wp-content/plugins/independent-analytics/IAWP/Utils/ |
Upload File : |
<?php
namespace IAWP\Utils;
/** @internal */
class String_Util
{
/** These functions are copied verbatim from the WordPress polyfills added in 5.9.
* They allow us to use these PHP 8 functions with PHP 7 and WP 5.5 */
public static function str_contains($haystack, $needle)
{
return '' === $needle || \false !== \strpos($haystack, $needle);
}
public static function str_starts_with($haystack, $needle)
{
if ('' === $needle) {
return \true;
}
return 0 === \strpos($haystack, $needle);
}
public static function str_ends_with($haystack, $needle)
{
if ('' === $haystack && '' !== $needle) {
return \false;
}
$len = \strlen($needle);
return 0 === \substr_compare($haystack, $needle, -$len, $len);
}
}