This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var string = AttributedString(localized: "This contains my message attribute", including: \.myApp) | |
let start = string.startIndex | |
let end = string.characters.index(start, offsetBy: 4) | |
string[start..<end].myApp.message = Message(id: "message_id", value: "secret") | |
// print(string.runs): | |
// This { | |
// NSPresentationIntent = [paragraph (id 1)] | |
// NSLanguage = en | |
// secretMessage = Message(id: "message_id", value: "secret") | |
// } | |
// contains my message attribute { | |
// NSPresentationIntent = [paragraph (id 1)] | |
// NSLanguage = en | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment