Skip to content

Commit 4d19602

Browse files
committed
removed linesFrom()
1 parent e42bf5c commit 4d19602

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/main/kotlin/kscript/text/StreamUtil.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
package kscript.text
22

33

4-
/** a `Sequence<String>` iterator for standard input */
4+
/** A `Sequence<String>` iterator for standard input */
55
val stdin by lazy { generateSequence() { readLine() } }
66

77
fun linesFrom(file: java.io.File) = java.io.BufferedReader(java.io.FileReader(file)).lineSequence()
88

9-
// just used for testing and development
10-
fun linesFrom(vararg lines: String) = lines.asSequence()
11-
129

1310
/**
14-
* File argument processor that works similar to awk. If data is available on stdin, use it. If not expect a file argument and read from that one instead.
11+
* File argument processor that works similar to awk: If data is available on stdin, use it. If not expect a file argument and read from that one instead.
1512
* */
1613
fun resolveArgFile(args: Array<String>, position: Int = 0): Sequence<String> {
1714
// if (stdin.iterator().hasNext()) return stdin

0 commit comments

Comments
 (0)