echo remove_variation_selector('竈門禰󠄀豆子'); // => 竈門禰豆子
Last active
June 24, 2022 08:38
-
-
Save tateren/eb4d56e893a5e6209bd739ef91deeab6 to your computer and use it in GitHub Desktop.
異体字セレクタ除去するやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (function_exists('remove_variation_selector')) { | |
function remove_variation_selector(string $string): string | |
{ | |
return preg_replace("/[\u{FE00}-\u{FE0F}\u{E0100}-\u{E01EF}]/u", '', $string); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment