Sha256: 42d4d714b889768100369db4498d7aef5eefc00a794018ca1869ccb2beb2263d

Contents?: true

Size: 368 Bytes

Versions: 3

Compression:

Stored size: 368 Bytes

Contents

require "ss7utils/version"

module Ss7utils
   def pc2hex(pc = String.new)
    result = Array.new
    pc.split('-').each { |part|
      result.unshift('%02x' % part.to_i)
    }
    result.join
  end
  def hex2pc(hex = String.new)
    result = Array.new
    hex.scan(/../).each { |part|
      result.unshift('%03i' % part.to_i(16))
    }
    result.join('-')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ss7utils-0.0.3 lib/ss7utils.rb
ss7utils-0.0.2 lib/ss7utils.rb
ss7utils-0.0.1 lib/ss7utils.rb