https://github.com/hellonico/custom-reader
https://github.com/hellonico/custom-reader
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hellonico/custom-reader
- Owner: hellonico
- License: epl-1.0
- Created: 2015-07-28T02:57:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-28T02:59:42.000Z (over 10 years ago)
- Last Synced: 2025-09-02T03:42:56.717Z (8 months ago)
- Language: Java
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# custom-reader
A Clojure library designed to ... well, that part is up to you.
## Usage
See the test examples:
With file test.txt
```
thisisaline 2thisisanotherline2thisisathirdline
```
This gives:
```
(deftest test-with-special-line-ending-char-has-3-lines
(let [
rdr (custom.java.BufferedReader. (java.io.FileReader. "resources/test.txt") \2)
]
(is (= 3 (count (line-seq2 rdr))))))
```
And with a regular file:
```
this is
counted
as
only one line
```
This gives
```
(deftest test-with-normal-line-endings
(let [
rdr (custom.java.BufferedReader. (java.io.FileReader. "resources/test2.txt") \2)
]
(is (= 1 (count (line-seq2 rdr))))))
```
## License
Copyright © 2015 FIXME
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.