Tusker/Pachyderm/Extensions/Data.swift

17 lines
348 B
Swift
Raw Permalink Normal View History

2018-09-11 14:52:21 +00:00
//
// Data.swift
// Pachyderm
//
// Created by Shadowfacts on 9/8/18.
// Copyright © 2018 Shadowfacts. All rights reserved.
//
import Foundation
extension Data {
mutating func append(_ string: String, encoding: String.Encoding = .utf8) {
guard let data = string.data(using: encoding) else { return }
append(data)
}
}