Skip to content

Instantly share code, notes, and snippets.

@laevandus

laevandus/Interpolation.swift Secret

Created Mar 22, 2021
Embed
What would you like to do?
extension EntryInterpolation {
mutating func appendInterpolation<T: CustomStringConvertible>(_ value: T) {
values.append(value.description)
}
}
let index = 2
let items = ["Item 1", "Item 2"]
entryStorage.add("Entry \(index): items=\(items)")
// Entry 2: items=["Item 1", "Item 2"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment