replaceOrAddString(_:forKey:)

Adds a key-value pair to the collection, where the value is a string.

Metadata.swift:209
mutating func replaceOrAddString(_ stringValue: String, forKey key: String)

Parameters

stringValue

The string value to be associated with the given key.

key

The key to be associated with the given value.

If there are pairs already associated to the given key, they will all be removed first, and the new pair will be added. If no pairs are present with the given key, a new one will be added.