Append String to NSData iOS swift
Solution:
If you want to append a string to already prepared NSData then follow the below steps to easily append.
If you want to append a string to already prepared NSData then follow the below steps to easily append.
mutating func append(_ string: String) {
if let data = string.data(using: .utf8) {
append(data)
}
}
Comments
Post a Comment