title: Kotlin replace multiple words in string
body: <p>How to replace many parts of a string with something else in Kotlin using <code>.replace()</code></p>
  
  <p>For example, we can do it only by replacing one word</p>
  
  <pre><code>fun main(args: Array&lt;String&gt;) {
  
      var w_text = "welcome his name is John"
  
      println("${w_text.replace("his","here")}")
  }
  </code></pre>
  
  <p>and the result will be " welcome here name is John " .</p>
  
  <p>finally we need the result be " welcome here name is alles "</p>
  
  <p>by replacing <strong>his</strong> to <strong>here</strong> and <strong>john</strong> to <strong>alles</strong> using  <code>.replace()</code></p>