Skip to content

Instantly share code, notes, and snippets.

@y13i
Last active August 10, 2017 00:45
Show Gist options
  • Select an option

  • Save y13i/e1329a007bfc3427ccab2fb7821a3e5e to your computer and use it in GitHub Desktop.

Select an option

Save y13i/e1329a007bfc3427ccab2fb7821a3e5e to your computer and use it in GitHub Desktop.
Swift 3 で16進数文字列と整数の相互変換 ref: http://qiita.com/y13i/items/9af41a1cb507a4b388e0
String(42, radix: 16) // => "2a"
Int("2a", radix: 16)! // => 42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment