diff options
author | Vitaly Takmazov | 2020-09-17 00:46:27 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-12-10 18:59:55 +0300 |
commit | cf97b1cd43a91725e0419a953815287fde0bf70f (patch) | |
tree | 82961197cf7fa1bfa40550748ddd309e5e4d38c3 /Juick/Helpers/Data+Hex.swift | |
parent | 4851a21c41488a6f0c01e60f1bd1472846f816bf (diff) |
SwiftUI WIP
Diffstat (limited to 'Juick/Helpers/Data+Hex.swift')
-rw-r--r-- | Juick/Helpers/Data+Hex.swift | 16 |
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 + } +} |