Handbook
Glossary
string-reader
Vocabulary
io
.
streams
.
string
Definition
USING:
sequences.private
strings
;
IN:
io.streams.string
TUPLE:
string-reader
{
underlying
string
read-only
initial:
""
}
{
i
array-capacity
initial:
0
}
;
Methods
USING:
destructors
io.streams.string
kernel
;
M:
string-reader
dispose
drop
;
USING:
io
io.streams.string
kernel
;
M:
string-reader
stream-element-type
drop
+character+
;
inline
USING:
accessors
io
io.streams.string
sequences
;
M:
string-reader
stream-length
underlying>>
length
;
USING:
io
io.streams.sequence
io.streams.string
;
M:
string-reader
stream-read-unsafe
sequence-read-unsafe
;
USING:
io
io.streams.sequence
io.streams.string
;
M:
string-reader
stream-read-until
sequence-read-until
;
USING:
io
io.streams.sequence
io.streams.string
;
M:
string-reader
stream-read1
sequence-read1
;
USING:
accessors
io
io.streams.sequence
io.streams.string
kernel
math
sequences
;
M:
string-reader
stream-readln
dup
>sequence-stream<
bounds-check?
[
"\r\n"
over
sequence-read-until
13
eq?
[
over
>sequence-stream<
dupd
?nth
10
eq?
[
1
+
pick
i<<
]
[
drop
]
if
]
when
nip
""
or
]
[
drop
f
]
if
;
USING:
io
io.streams.sequence
io.streams.string
;
M:
string-reader
stream-seek
sequence-seek
;
USING:
io
io.streams.string
kernel
;
M:
string-reader
stream-seekable?
drop
t
;
inline
USING:
accessors
io
io.streams.string
;
M:
string-reader
stream-tell
i>>
;