Sha256: 93362f5bcfc8dd4a256edb26f7b66b99120a76169a763a3339c8bd9cb5f8423d
Contents?: true
Size: 471 Bytes
Versions: 744
Compression:
Stored size: 471 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'optparse' opts = {} OptionParser.new do |options| options.banner = "USAGE: #{$PROGRAM_NAME} [opts] " options.on('-pSTRING', '--payload=STRING', '<Required - String to Encode>') do |p| opts[:payload] = p end end.parse! if opts.empty? puts `#{$PROGRAM_NAME} --help` exit 1 end payload = opts[:payload].to_s.scrub puts payload.unpack('U*').map { |i| "\\u#{i.to_s(16).rjust(4, '0')}" }.join
Version data entries
744 entries across 744 versions & 1 rubygems