countrytext / 从文本中提取国家
从字符串中提取国家名称的应用程序
v0.2
2023-05-18 14:40 UTC
README
从字符串中提取国家名称的应用程序
安装
安装composer后,执行以下命令
composer require countrytext/extracting-country-from-text
用法
$country = new ExtractCounty([ "searchWord" => "korea", // required "searcItem" => "name", // optional "fullSearch" => false, // optional "language" => "en", // optional ]); $country->getCountryFullName(); // Array ( [0] => Korea (Democratic People's Republic of) [1] => Korea, Republic of ) $country->getCountryTwoLetter(); // Array ( [0] => kp [1] => kr ) $country->getCountryThreeLetter(); // Array ( [0] => prk [1] => kor )
参考
我参考了这个仓库制作的