Sha256: 6a2f340279c059a36b11ffc89e899834a99b22b36284802f92e64e5655dbee6e

Contents?: true

Size: 642 Bytes

Versions: 15

Compression:

Stored size: 642 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

module TwitterCldr
  module Normalization
    class Base

      class << self

        def normalize(string)
          code_points = TwitterCldr::Utils::CodePoints.from_string(string)
          normalized_code_points = normalize_code_points(code_points)
          TwitterCldr::Utils::CodePoints.to_string(normalized_code_points)
        end

        def combining_class_for(code_point)
          TwitterCldr::Shared::CodePoint.find(code_point).combining_class.to_i
        rescue NoMethodError
          0
        end

      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
twitter_cldr-2.4.3 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.4.2 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.4.1 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.4.0 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.2.0 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.1.1 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.1.0 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.0.2 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.0.1 lib/twitter_cldr/normalization/base.rb
twitter_cldr-2.0.0 lib/twitter_cldr/normalization/base.rb
twitter_cldr-1.9.1 lib/twitter_cldr/normalization/base.rb
twitter_cldr-1.9.0 lib/twitter_cldr/normalization/base.rb
twitter_cldr-1.8.1 lib/twitter_cldr/normalization/base.rb
twitter_cldr-1.8.0 lib/twitter_cldr/normalization/base.rb
twitter_cldr-1.7.0 lib/twitter_cldr/normalization/base.rb