doc.txt : ISO 3166 country codes

_country-codes.ss_ : ISO 3166 country codes

Index terms: _iso3166_ _3166_ _country codes_


This is just a quick-and-dirty module for getting the country name,
given a two letter country code.  A _country code_ is a two letter
string, like "US" or "KR".


    > (require (planet ("" ("dyoo" "country-codes.plt"))))
    > (country-code->name "CA")
    > (length country-codes)
    > (country-code? "fi")


> country-code?: string -> boolean
Returns true if the string is a known country code.

> country-code->name: string -> (union string #f)
Returns the name of the country associated with the given country code.

There's also a list of all the country codes in _country-codes_.

> country-codes: (list-immutableof string)


The country codes themselves are uppercased, although COUNTRY-CODE?
and COUNTRY-CODE->NAME will try to permissivly match with lowercase as
well.  Also be aware that the string associated with AX is non-ASCII.