summaryrefslogtreecommitdiff
path: root/Juick/Helpers/Data+Hex.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Helpers/Data+Hex.swift')
-rw-r--r--Juick/Helpers/Data+Hex.swift16
1 files changed, 16 insertions, 0 deletions
diff --git a/Juick/Helpers/Data+Hex.swift b/Juick/Helpers/Data+Hex.swift
new file mode 100644
index 0000000..69c170d
--- /dev/null
+++ b/Juick/Helpers/Data+Hex.swift
@@ -0,0 +1,16 @@
+//
+// Data+Hex.swift
+// Juick
+//
+// Created by Vitaly Takmazov on 16.09.2020.
+// Copyright © 2020 com.juick. All rights reserved.
+//
+
+import Foundation
+
+extension Data {
+ var hexString: String {
+ let hexString = map { String(format: "%02.2hhx", $0) }.joined()
+ return hexString
+ }
+}