Created
July 26, 2019 22:43
-
-
Save carson-katri/437999e2bd6bac241a612ae66f6a3125 to your computer and use it in GitHub Desktop.
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
@_functionBuilder | |
struct AttributedStringBuilder { | |
static func buildBlock(_ segments: NSAttributedString...) -> NSAttributedString { | |
let string = NSMutableAttributedString() | |
segments.forEach { string.append($0) } | |
return string | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment