countrytext/extracting-country-from-text

Applications that extract country names from strings

Maintainers

Package info

github.com/bluegmlduf2/ExtractingCountryFromText

pkg:composer/countrytext/extracting-country-from-text

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.2 2023-05-18 14:40 UTC

This package is auto-updated.

Last update: 2026-03-19 19:17:01 UTC


README

Applications that extract country names from strings

Installation

After installing the composer, execute the following commands

composer require countrytext/extracting-country-from-text

Usage

$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 )

Reference

I made it by referring to this repository