Decorating string fragments using delimiters

<p>Back in my days at&nbsp;</p> <p><a href="https://medium.com/u/7d8fd6d6f6eb?source=post_page-----1ef5c380868f--------------------------------" rel="noopener" target="_blank">Supercharge</a></p> <p>I had the chance to work with&nbsp;</p> <p><a href="https://medium.com/u/34dd3ed4841c?source=post_page-----1ef5c380868f--------------------------------" rel="noopener" target="_blank">Gergő N&eacute;meth</a></p> <p>&nbsp;on a really cool project and I remember a specific task we received to decorate fragments of a string with different attributes &mdash; and this is what we&rsquo;ll look into in this article.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:770/1*nOXGkK7xZ9V2-TJmRse39g.jpeg" style="height:467px; width:700px" /></p> <p>Photo by&nbsp;<a href="https://unsplash.com/@lukerv4?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash" rel="noopener ugc nofollow" target="_blank">Ervin Lukacs</a>&nbsp;on&nbsp;<a href="https://unsplash.com/photos/brown-concrete-building-near-body-of-water-during-daytime-sMyQb3i9bNA?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash" rel="noopener ugc nofollow" target="_blank">Unsplash</a></p> <p>Considering the string &ldquo;<em>The prettiest city in Europe is Budapest</em>&rdquo;, let&rsquo;s suppose we would like that the word &ldquo;<em>Europe</em>&rdquo; were displayed on a&nbsp;<strong>bold</strong>&nbsp;font and with&nbsp;<strong>blue</strong>&nbsp;color, while the word &ldquo;<em>Budapest</em>&rdquo; were displayed also on a&nbsp;<strong>bold</strong>&nbsp;font but with&nbsp;<strong>green</strong>&nbsp;color.</p> <p><a href="https://medium.com/swift2go/decorating-string-fragments-using-delimiters-1ef5c380868f"><strong>Click Here</strong></a></p>