Emoji::NationalFlag - convert from country code to national flag emoji
use Emoji::NationalFlag qw/ code2flag flag2code /;
use utf8;
is code2flag('jp'), "🇯🇵";
is code2flag('jp'), "\x{1F1EF}\x{1F1f5}";
is flag2code("🇯🇵"), 'jp';
is flag2code("\x{1F1EF}\x{1F1f5}"), 'jp';
Emoji::NationalFlag is a module to convert from country code (ISO 3166-1 alpha-2) to national flag emoji, and vice versa
This method returns national flag emoji if the supplied code (case insensitive) is valid, otherwise returns undef
This method returns lower case of ISO 3166-1 alpha-2 country code if the supplied emoji is valid, otherwise returns undef
punytan punytan@gmail.com
Copyright 2017- punytan
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.