Best way to use BufferedReader in Kotlin
<p>So I've just started using Kotlin for Android, and converted my Android Java codes into Kotlin.</p>

<p>In one of the conversions, I stumbled upon a BufferedReader, which I would usually write in Java as the following:</p>

<pre><code>String result = "";
String line = "";
BufferedReader reader = new BufferedReader(someStream);
while ( (line = reader.readLine()) != null ) {
    result += line;
}
</code></pre>

<p>But in Kotlin, it seems that Kotlin doesn't allow me to assign values to variables in while conditions.</p>

<p>Currently, I've written the code as the following:</p>

<pre><code>val reader = BufferedReader(someStream)
var line : String? = ""
while (line != null) {
    line = reader.readLine()
    result += line
}
</code></pre>

<p>which I don't find so elegant and feels prev-gen, despite using Kotlin.</p>

<p>What would be the best way to use BufferedReader in Kotlin?</p>