title: How to split string by delimiter in scala?
body: <p>I have a string like this:</p>
  
  <pre><code>val str = "3.2.1"
  </code></pre>
  
  <p>And I want to do some manipulations based on it.</p>
  
  <p>I will share also what I want to do and it will be nice if you can share your suggestions:</p>
  
  <p>im doing automation for some website, and based on this string I need to do some actions.</p>
  
  <p>So:</p>
  
  <p>the first digit - I will need to choose by value: value="str[0]"</p>
  
  <p>the second digit - I will need to choose by value: value="str[0]+"."+str[1]"</p>
  
  <p>the third digit - I will need to choose by value: value="str[0]+"."+str[1]+"."+str[2]"</p>
  
  <p>as you can see the second field i need to choose is the name firstdigit.seconddigit and the third field is firstdigit.seconddigit.thirddigit</p>