HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/ruby/vendor_ruby/unf/normalizer.rb
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