Sha256: 0bf15f4f3fa2f785bed227318882fccd56ad9e9e75397da6b68589552a41399e

Contents?: true

Size: 800 Bytes

Versions: 114

Compression:

Stored size: 800 Bytes

Contents

require 'singleton'
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
  require 'unf/normalizer_jruby'
else
  require 'unf/normalizer_cruby'
end

# UTF-8 string normalizer class.  Implementations may vary depending
# on the platform.
class UNF::Normalizer
  include Singleton

  class << self
    # :singleton-method: instance
    #
    # Returns a singleton normalizer instance.

    # :singleton-method: new
    #
    # Returns a new normalizer instance.  Use +singleton+ instead.
    public :new

    # A shortcut for instance.normalize(string, form).
    def normalize(string, form)
      instance.normalize(string, form)
    end
  end

  # :method: normalize
  # :call-seq:
  #   normalize(string, form)
  #
  # Normalizes a UTF-8 string into a given form (:nfc, :nfd, :nfkc or
  # :nfkd).
end

Version data entries

114 entries across 86 versions & 14 rubygems

Version Path
direct7-0.0.18 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
direct7-0.0.17 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
direct7-0.0.16 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
unf-0.2.0-java lib/unf/normalizer.rb
unf-0.2.0 lib/unf/normalizer.rb
direct7-0.0.13 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
direct7-0.0.12 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
direct7-0.0.11 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.0.9 vendor/bundle/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/unf-0.1.4/lib/unf/normalizer.rb