Swift Data To String

[Solved] Swift Data To String | Swift - Code Explorer | yomemimo.com
Question : swift + data to string

Answered by : thee-thee-fire-fire

let str = String(decoding: data, as: UTF8.self)

Source : https://www.hackingwithswift.com/example-code/language/how-to-convert-data-to-a-string | Last Update : Sun, 10 May 20

Question : swift date to string

Answered by : davazo

let today = Date()
let formatter1 = DateFormatter()
formatter1.dateStyle = .short
print(formatter1.string(from: today))

Source : https://www.hackingwithswift.com/example-code/system/how-to-convert-dates-and-times-to-a-string-using-dateformatter | Last Update : Wed, 12 May 21

Answers related to swift data to string

Code Explorer Popular Question For Swift