Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 513 Bytes

File metadata and controls

34 lines (22 loc) · 513 Bytes

CountryLibrary

A small extension to handle countries within Swift Swift

You have a country Struct with

  • The Country Code
  • The Country Name
  • The Country Flag

Code Example :

All countries from Swift Locale

CountryLibrary.countries

Already ordered by name

To retrieve a Country from a string

By Country Code

"FR".country(by: .code)

By Country Name

"Canada".country(by: .name)