kotlin.io.java.io.BufferedReader.lineSequence

lineSequence

fun BufferedReader.lineSequence(): Sequence<String>

Platform and version requirements: JVM

Returns a sequence of corresponding file lines.

Note: the caller must close the underlying BufferedReader when the iteration is finished; as the user may not complete the iteration loop (e.g. using a method like find() or any() on the iterator may terminate the iteration early.

We suggest you try the method useLines instead which closes the stream when the processing is complete.

Return a sequence of corresponding file lines. The sequence returned can be iterated only once.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/java.io.-buffered-reader/line-sequence.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部