Does an interpolated String inside a database still hold the refference to its variables?

I have a variable for storing a username like this:
Code Block
var username = "Albert"

I have an interpolated String using this variable like this:
Code Block
let string = "Hey, \(username), how are you doing today?"

This String is inside a codable object, which is persisted with Core Data.

When the codable object is loaded after a while and the username changed, will it display the new username in the interpolated String or will the string hold the initial value when persisted?

Answered by DTS Engineer in 618482022

will the string hold the initial value when persisted?

This.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Accepted Answer

will the string hold the initial value when persisted?

This.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Does an interpolated String inside a database still hold the refference to its variables?
 
 
Q