diff --git a/lib/unisec/cli/hexdump.rb b/lib/unisec/cli/hexdump.rb index dc985d1..90f1eca 100644 --- a/lib/unisec/cli/hexdump.rb +++ b/lib/unisec/cli/hexdump.rb @@ -17,6 +17,9 @@ module Commands # UTF-16LE: 4100 4300 4300 4500 4900 5300 # UTF-32BE: 00000041 00000043 00000043 00000045 00000049 00000053 # UTF-32LE: 41000000 43000000 43000000 45000000 49000000 53000000 + # + # $unisec hexdump "ACCEIS" --enc utf16le + # 4100 4300 4300 4500 4900 5300 # ``` class Hexdump < Dry::CLI::Command desc 'Hexdump in all Unicode encodings' diff --git a/lib/unisec/hexdump.rb b/lib/unisec/hexdump.rb index 8378b4e..42efe25 100644 --- a/lib/unisec/hexdump.rb +++ b/lib/unisec/hexdump.rb @@ -86,6 +86,7 @@ def self.utf32le(str) end # Display a CLI-friendly output summurizing the hexdump in all Unicode encodings + # @return [String] CLI-ready output # @example # puts Unisec::Hexdump.new('K').display # => # # UTF-8: e2 84 aa diff --git a/lib/unisec/surrogates.rb b/lib/unisec/surrogates.rb index a9cb9af..3e7c814 100644 --- a/lib/unisec/surrogates.rb +++ b/lib/unisec/surrogates.rb @@ -102,6 +102,7 @@ def code_point # Display a CLI-friendly output summurizing everithing about the surrogates: # the corresponding character, code point, high and low surrogates # (each displayed as hexadecimal, decimal and binary). + # @return [String] CLI-ready output # @example # surr = Unisec::Surrogates.new(128169) # puts surr.display # =>