How do I escape tilde character in scala?
<p>Given that i have a file that  looks like this</p>

<pre><code>CS~84~Jimmys Bistro~Jimmys
...
</code></pre>

<p>using tilde (~) as a delimiter, how can i split it?</p>

<pre><code>val company = dataset.map(k=&gt;k.split(""\~"")).map(
k =&gt; Company(k(0).trim, k(1).toInt, k(2).trim, k(3).trim)
</code></pre>

<p>The above don't work</p>