Grapheme.php
9 months ago
bootstrap.php
9 months ago
bootstrap80.php
9 months ago
index.php
2 years ago
bootstrap.php
76 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) exit; |
| 3 | use MailPoetVendor\Symfony\Polyfill\Intl\Grapheme as p; |
| 4 | if (\PHP_VERSION_ID >= 80000) { |
| 5 | return require __DIR__ . '/bootstrap80.php'; |
| 6 | } |
| 7 | if (!\defined('GRAPHEME_EXTR_COUNT')) { |
| 8 | \define('GRAPHEME_EXTR_COUNT', 0); |
| 9 | } |
| 10 | if (!\defined('GRAPHEME_EXTR_MAXBYTES')) { |
| 11 | \define('GRAPHEME_EXTR_MAXBYTES', 1); |
| 12 | } |
| 13 | if (!\defined('GRAPHEME_EXTR_MAXCHARS')) { |
| 14 | \define('GRAPHEME_EXTR_MAXCHARS', 2); |
| 15 | } |
| 16 | if (!\function_exists('grapheme_extract')) { |
| 17 | function grapheme_extract($haystack, $size, $type = 0, $start = 0, &$next = 0) |
| 18 | { |
| 19 | return p\Grapheme::grapheme_extract($haystack, $size, $type, $start, $next); |
| 20 | } |
| 21 | } |
| 22 | if (!\function_exists('grapheme_stripos')) { |
| 23 | function grapheme_stripos($haystack, $needle, $offset = 0) |
| 24 | { |
| 25 | return p\Grapheme::grapheme_stripos($haystack, $needle, $offset); |
| 26 | } |
| 27 | } |
| 28 | if (!\function_exists('grapheme_stristr')) { |
| 29 | function grapheme_stristr($haystack, $needle, $beforeNeedle = \false) |
| 30 | { |
| 31 | return p\Grapheme::grapheme_stristr($haystack, $needle, $beforeNeedle); |
| 32 | } |
| 33 | } |
| 34 | if (!\function_exists('grapheme_strlen')) { |
| 35 | function grapheme_strlen($input) |
| 36 | { |
| 37 | return p\Grapheme::grapheme_strlen($input); |
| 38 | } |
| 39 | } |
| 40 | if (!\function_exists('grapheme_strpos')) { |
| 41 | function grapheme_strpos($haystack, $needle, $offset = 0) |
| 42 | { |
| 43 | return p\Grapheme::grapheme_strpos($haystack, $needle, $offset); |
| 44 | } |
| 45 | } |
| 46 | if (!\function_exists('grapheme_strripos')) { |
| 47 | function grapheme_strripos($haystack, $needle, $offset = 0) |
| 48 | { |
| 49 | return p\Grapheme::grapheme_strripos($haystack, $needle, $offset); |
| 50 | } |
| 51 | } |
| 52 | if (!\function_exists('grapheme_strrpos')) { |
| 53 | function grapheme_strrpos($haystack, $needle, $offset = 0) |
| 54 | { |
| 55 | return p\Grapheme::grapheme_strrpos($haystack, $needle, $offset); |
| 56 | } |
| 57 | } |
| 58 | if (!\function_exists('grapheme_strstr')) { |
| 59 | function grapheme_strstr($haystack, $needle, $beforeNeedle = \false) |
| 60 | { |
| 61 | return p\Grapheme::grapheme_strstr($haystack, $needle, $beforeNeedle); |
| 62 | } |
| 63 | } |
| 64 | if (!\function_exists('grapheme_substr')) { |
| 65 | function grapheme_substr($string, $offset, $length = null) |
| 66 | { |
| 67 | return p\Grapheme::grapheme_substr($string, $offset, $length); |
| 68 | } |
| 69 | } |
| 70 | if (!\function_exists('MailPoetVendor\\grapheme_str_split')) { |
| 71 | function grapheme_str_split($string, $length = 1) |
| 72 | { |
| 73 | return p\Grapheme::grapheme_str_split($string, $length); |
| 74 | } |
| 75 | } |
| 76 |