| 1 | <?php |
||
| 11 | class ThreemaGateway_Helper_Emoji |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Replaces unicode escape sequence with the correct UNICODE character. |
||
| 15 | * |
||
| 16 | * XenForo template helper: emojiparseunicode. |
||
| 17 | * You need to pass it as surrogate pairs, e.g. \ud83d\udd11. |
||
| 18 | * |
||
| 19 | * @param string $string |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | public static function parseUnicode($string) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Replaces digits with their corresponding unicode characters |
||
| 35 | * (surrogate pairs). |
||
| 36 | * |
||
| 37 | * XenForo template helper: emojireplacedigits. |
||
| 38 | * Only replaces one digit numbers. "10" is therefore replaced by two unicode |
||
| 39 | * characters. |
||
| 40 | * |
||
| 41 | * @param string $string |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public static function replaceDigits($string) |
||
| 50 | } |
||
| 51 |