Module: Unisec::Utils::Integer — Documentation by YARD 0.9.44

# Module: Unisec::Utils::Integer

Defined in:
  lib/unisec/utils.rb

## Class Method Summary collapse

- .deccp2stdhexcp(int_cp) ⇒ String

  Convert from decimal code point to standardized format hexadecimal code point.

## Class Method Details

### .deccp2stdhexcp(int_cp) ⇒ `String`

TODO:

Replace this method by the Integer.convert()

Convert from decimal code point to standardized format hexadecimal code point

#### Examples:

    Unisec::Utils::Integer.deccp2stdhexcp(128640) # => "U+1F680"

Parameters:

- int_cp (`Integer`) —

  Code point in decimal format

Returns:

- (`String`) —

  code point in Unicode format

    231
    232
    233
    # File 'lib/unisec/utils.rb', line 231

    def self.deccp2stdhexcp(int_cp)
      "U+#{format('%.4x', int_cp).upcase}"
    end