title: How to use replacingOccurrences for NSAttributedString in swift?
body: <p>In a <code>NSAttributed</code> type statement, I want to keep the existing attributed value and give it a new attributed value. </p>
  
  <p>The problem is that <code>replacingOccurrences</code> is only possible for string types, as I want to give a new value every time the word appears in the entire sentence. </p>
  
  <p>If I change <code>NSAttributedString</code> to string type, the attributed value is deleted. I must keep the existing values.</p>
  
  <p>How can I do that?</p>