From cf97b1cd43a91725e0419a953815287fde0bf70f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 17 Sep 2020 00:46:27 +0300 Subject: SwiftUI WIP --- Juick/Helpers/Data+Hex.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Juick/Helpers/Data+Hex.swift (limited to 'Juick/Helpers/Data+Hex.swift') 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 + } +} -- cgit v1.2.3