Vernissage/PixelfedKit/Sources/PixelfedKit/Extensions/NSMutableData+String.swift

16 lines
334 B
Swift
Raw Normal View History

2023-02-17 12:21:09 +01:00
//
// https://mczachurski.dev
// Copyright © 2023 Marcin Czachurski and the repository contributors.
2023-03-28 10:35:38 +02:00
// Licensed under the Apache License 2.0.
2023-02-17 12:21:09 +01:00
//
import Foundation
extension NSMutableData {
func append(_ string: String) {
if let data = string.data(using: .utf8) {
self.append(data)
}
}
}