Skip to content

Instantly share code, notes, and snippets.

@n-b
Created December 22, 2014 14:09
Show Gist options
  • Save n-b/405e12d431f5e62bb4ff to your computer and use it in GitHub Desktop.
Save n-b/405e12d431f5e62bb4ff to your computer and use it in GitHub Desktop.
NSData hexadecimalRepresentation
(lldb) po [@"Hello World" dataUsingEncoding:4]
<48656c6c 6f20576f 726c64>
(lldb) po [[@"Hello World" dataUsingEncoding:4] lowercaseHexStringWithoutSpaces]
48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] uppercaseHexStringWithoutSpaces]
48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] CKHexString]
48656c6c 6f20576f 726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] MCHexString]
48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] CKUppercaseHexStringWithoutSpaces]
48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] hexString]
48656c6c 6f20576f 726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] mf_copyHexString]
48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] aa_hexString]
48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] hexEncoding]
48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] MSHexString]
48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] __imHexString]
48656C6C6F20576F726C64
@karmamaster
Copy link

can you let me know the "dataUsingEncoding:4" is meaning for what?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment