class ICU::Region

Overview

Region

Territory containment and mapping.

Usage

ICU::Region.new(250)                                   # => "FR"
ICU::Region.new("DE")                                  # => 276
ICU::Region.new("EU").contains?(ICU::Region.new("IT")) # => true
ICU::Region.new(21).contained_regions.map(&.code)      # => ["BM", "CA", "GL", "PM", "US"]

See also

Defined in:

icu/region.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(code : String) #

[View source]
def self.new(code : Int32) #

[View source]
def self.new(uregion : LibICU::URegion) #

[View source]

Instance Method Detail

def ==(other : Region) #

[View source]
def code : String #

[View source]
def contained_regions : Array(Region) #

[View source]
def containing_region : Region #

[View source]
def contains?(other : Region) #

[View source]
def numeric_code : Int32 #

[View source]
def to_unsafe : LibICU::URegion #

[View source]