author | Claus Gittinger <cg@exept.de> |
Sun, 02 Nov 1997 19:37:48 +0100 | |
changeset 3087 | 609b8f05a250 |
parent 3031 | 565ba030c404 |
child 3098 | 4203b0d13fc8 |
permissions | -rw-r--r-- |
1 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
252 | 3 |
All Rights Reserved |
1 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
PositionableStream subclass:#WriteStream |
|
1295 | 14 |
instanceVariableNames:'' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Streams' |
|
1 | 18 |
! |
19 |
||
1965 | 20 |
!WriteStream class methodsFor:'documentation'! |
1 | 21 |
|
88 | 22 |
copyright |
23 |
" |
|
24 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
252 | 25 |
All Rights Reserved |
88 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
68 | 36 |
documentation |
37 |
" |
|
2883 | 38 |
Streams for writing into. |
39 |
WriteStreams are especially useful, if big strings are to be constructed |
|
40 |
from pieces - create a writeStream, add the pieces (with #nextPut or |
|
41 |
#nextPutAll) and finally fetch the concatenated string via #contents. |
|
42 |
This is much better than constructing the big string by concatenating via |
|
43 |
the comma (,) operator, since less intermediate garbage objects are created. |
|
44 |
||
45 |
This implementation currently DOES change the |
|
261 | 46 |
identity if the streamed-upon collection IF it cannot grow easily. |
47 |
Collections which cannot grow easily are for example: Array, ByteArray and String. |
|
88 | 48 |
Thus it is slightly incompatible to ST-80 since 'aStream contents' does |
49 |
not always return the original collection. This may change. |
|
1295 | 50 |
|
51 |
[author:] |
|
52 |
Claus Gittinger |
|
68 | 53 |
" |
2883 | 54 |
! |
55 |
||
56 |
examples |
|
57 |
" |
|
58 |
[exBegin] |
|
59 |
|s| |
|
60 |
||
61 |
s := WriteStream on:''. |
|
62 |
s nextPutAll:'hello'; |
|
63 |
space; |
|
64 |
nextPutAll:'world'. |
|
65 |
||
66 |
s contents inspect |
|
67 |
[exEnd] |
|
68 |
||
69 |
[exBegin] |
|
70 |
|s| |
|
71 |
||
72 |
s := WriteStream on:''. |
|
73 |
s nextPutAll:'hello'; |
|
74 |
space; |
|
75 |
nextPutAll:'world'. |
|
76 |
||
77 |
Transcript nextPutLine:(s contents) |
|
78 |
[exEnd] |
|
79 |
||
80 |
[exBegin] |
|
81 |
|s| |
|
82 |
||
83 |
s := '' writeStream. |
|
84 |
s nextPutAll:'hello'; |
|
85 |
space; |
|
86 |
nextPutAll:'world'. |
|
87 |
||
88 |
Transcript nextPutLine:(s contents) |
|
89 |
[exEnd] |
|
90 |
" |
|
91 |
||
345 | 92 |
! ! |
93 |
||
1 | 94 |
!WriteStream methodsFor:'accessing'! |
95 |
||
96 |
contents |
|
345 | 97 |
"return the current contents (a collection) of the stream. |
98 |
Currently, this returns the actual collection if possible |
|
99 |
(and reset is implemented to create a new one) in contrast to |
|
100 |
ST80, where contents returns a copy and reset only sets the writePointer. |
|
101 |
The ST/X behavior creates less temporary garbage in the normal case |
|
2410 | 102 |
(where things are written for the contents only) but may be incompatible |
345 | 103 |
with some applications. Time will show, if this is to be changed." |
1 | 104 |
|
260 | 105 |
|lastIndex| |
106 |
||
107 |
lastIndex := position - 1. |
|
108 |
collection size == lastIndex ifFalse:[ |
|
2410 | 109 |
collection isFixedSize ifTrue:[ |
110 |
" |
|
111 |
grow is expensive - return a copy. |
|
3087 | 112 |
(is this what users of writeStream expect ?) |
2410 | 113 |
" |
114 |
collection := collection copyFrom:1 to:lastIndex |
|
115 |
] ifFalse:[ |
|
116 |
collection grow:lastIndex |
|
117 |
] |
|
1 | 118 |
]. |
119 |
^ collection |
|
2410 | 120 |
|
3087 | 121 |
"Modified: / 19.2.1997 / 08:57:28 / stefan" |
122 |
"Modified: / 30.10.1997 / 16:21:23 / cg" |
|
1 | 123 |
! |
124 |
||
329 | 125 |
reset |
345 | 126 |
"reset the stream; write anew. |
2410 | 127 |
See the comment in WriteStream>>contents" |
329 | 128 |
|
129 |
collection := collection species new:(collection size). |
|
130 |
super reset |
|
2410 | 131 |
|
132 |
"Modified: 19.2.1997 / 08:57:00 / stefan" |
|
1 | 133 |
! ! |
134 |
||
611 | 135 |
!WriteStream methodsFor:'positioning'! |
136 |
||
137 |
position:index |
|
138 |
"redefined to allow positioning past the readLimit" |
|
139 |
||
140 |
((index > (collection size + 1)) or:[index < 0]) ifTrue: [^ self positionError]. |
|
141 |
position := index |
|
142 |
! ! |
|
143 |
||
144 |
!WriteStream methodsFor:'private'! |
|
145 |
||
146 |
growCollection |
|
2863
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
147 |
"grow the streamed collection to at least 10 elements" |
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
148 |
|
611 | 149 |
self growCollection:10 |
2863
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
150 |
|
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
151 |
"Modified: 19.8.1997 / 17:53:28 / cg" |
611 | 152 |
! |
153 |
||
154 |
growCollection:minNewSize |
|
155 |
"grow the streamed collection to at least minNewSize" |
|
156 |
||
157 |
|oldSize newSize newColl| |
|
158 |
||
159 |
oldSize := collection size. |
|
160 |
(oldSize == 0) ifTrue:[ |
|
2863
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
161 |
newSize := minNewSize |
611 | 162 |
] ifFalse:[ |
2863
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
163 |
newSize := oldSize * 2. |
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
164 |
(newSize < minNewSize) ifTrue:[newSize := minNewSize]. |
611 | 165 |
]. |
166 |
collection isFixedSize ifTrue:[ |
|
2863
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
167 |
newColl := collection species new:newSize. |
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
168 |
newColl replaceFrom:1 to:oldSize with:collection startingAt:1. |
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
169 |
collection := newColl |
611 | 170 |
] ifFalse:[ |
2863
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
171 |
collection grow:newSize |
611 | 172 |
]. |
2863
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
173 |
|
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
174 |
"Modified: 19.8.1997 / 17:53:11 / cg" |
611 | 175 |
! ! |
176 |
||
177 |
!WriteStream methodsFor:'private accessing'! |
|
178 |
||
179 |
on:aCollection from:start to:last |
|
180 |
"create and return a new stream for writing onto aCollection, where |
|
181 |
writing is limited to the elements in the range start to last." |
|
182 |
||
183 |
super on:aCollection from:start to:last. |
|
184 |
writeLimit := last. |
|
185 |
! ! |
|
186 |
||
187 |
!WriteStream methodsFor:'queries'! |
|
188 |
||
3031 | 189 |
isEmpty |
190 |
"return true, if the contents of the stream is empty" |
|
191 |
||
192 |
^ position == 1 |
|
193 |
||
194 |
"Created: 14.10.1997 / 20:44:37 / cg" |
|
195 |
! |
|
196 |
||
611 | 197 |
isWritable |
1405 | 198 |
"return true, if writing is supported by the recevier. |
199 |
Always return true here" |
|
200 |
||
611 | 201 |
^ true |
1405 | 202 |
|
203 |
"Modified: 16.5.1996 / 14:44:49 / cg" |
|
3031 | 204 |
! |
205 |
||
206 |
size |
|
207 |
"return the current size" |
|
208 |
||
209 |
^ position - 1. |
|
210 |
||
211 |
"Created: 14.10.1997 / 20:43:49 / cg" |
|
611 | 212 |
! ! |
213 |
||
63 | 214 |
!WriteStream methodsFor:'reading'! |
1 | 215 |
|
216 |
next |
|
10 | 217 |
"catch read access to write stream - report an error" |
1 | 218 |
|
10 | 219 |
self shouldNotImplement |
1 | 220 |
! |
221 |
||
222 |
peek |
|
10 | 223 |
"catch read access to write stream - report an error" |
1 | 224 |
|
10 | 225 |
self shouldNotImplement |
63 | 226 |
! ! |
227 |
||
611 | 228 |
!WriteStream methodsFor:'writing'! |
369 | 229 |
|
611 | 230 |
next:count put:anObject |
231 |
"append anObject count times to the receiver. |
|
232 |
Redefined to avoid count grows of the underlying collection - |
|
233 |
instead a single grow on the final size is performed." |
|
234 |
||
235 |
|final| |
|
236 |
||
237 |
(collection isNil or:[writeLimit notNil]) ifTrue:[ |
|
238 |
^ super next:count put:anObject |
|
239 |
]. |
|
369 | 240 |
|
611 | 241 |
final := position + count - 1. |
242 |
(final > collection size) ifTrue:[ |
|
243 |
self growCollection:final |
|
244 |
]. |
|
369 | 245 |
|
611 | 246 |
position to:final do:[:index | |
247 |
collection at:index put:anObject. |
|
248 |
]. |
|
249 |
position := position + count. |
|
250 |
(position > readLimit) ifTrue:[readLimit := position - 1]. |
|
251 |
^ anObject |
|
252 |
! |
|
1 | 253 |
|
254 |
nextPut:anObject |
|
1584 | 255 |
"append the argument, anObject to the stream. |
2863
aec08a0c2c2e
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2410
diff
changeset
|
256 |
Specially tuned for appending to String, ByteArray and Array streams." |
1 | 257 |
|
63 | 258 |
%{ /* NOCONTEXT */ |
259 |
||
260 |
REGISTER int pos; |
|
261 |
unsigned ch; |
|
262 |
OBJ coll; |
|
2883 | 263 |
OBJ p, wL, rL; |
1584 | 264 |
int __readLimit = -1; |
63 | 265 |
|
1136 | 266 |
coll = __INST(collection); |
267 |
p = __INST(position); |
|
63 | 268 |
|
2894 | 269 |
#ifndef NO_PRIM_STREAM |
293 | 270 |
if (__isNonNilObject(coll) && __isSmallInteger(p)) { |
1584 | 271 |
pos = __intVal(p); |
2883 | 272 |
wL = __INST(writeLimit); |
68 | 273 |
|
2883 | 274 |
if ((wL == nil) |
275 |
|| (__isSmallInteger(wL) && (pos <= __intVal(wL)))) { |
|
1584 | 276 |
OBJ cls; |
63 | 277 |
|
1584 | 278 |
cls = __qClass(coll); |
252 | 279 |
|
1584 | 280 |
rL = __INST(readLimit); |
281 |
if (__isSmallInteger(rL)) { |
|
282 |
__readLimit = __intVal(rL); |
|
283 |
} |
|
293 | 284 |
|
1584 | 285 |
if (cls == @global(String)) { |
286 |
if (__isCharacter(anObject) |
|
2883 | 287 |
&& ((ch = __intVal(__characterVal(anObject))) <= 255) /* ch is unsigned */ |
1584 | 288 |
&& (pos <= __stringSize(coll))) { |
2883 | 289 |
__StringInstPtr(coll)->s_element[pos-1] = ch; |
290 |
__INST(position) = __MKSMALLINT(pos + 1); |
|
291 |
if ((__readLimit >= 0) && (pos >= __readLimit)) { |
|
292 |
__INST(readLimit) = __MKSMALLINT(pos); |
|
1584 | 293 |
} |
2883 | 294 |
RETURN ( anObject ); |
1584 | 295 |
} |
296 |
} else if (cls == @global(ByteArray)) { |
|
297 |
if (__isSmallInteger(anObject) |
|
2864
328b52ecd339
no need for unsigned compare against 0
Claus Gittinger <cg@exept.de>
parents:
2863
diff
changeset
|
298 |
&& ((ch = __intVal(anObject)) <= 255) /* ch is unsigned */ |
2883 | 299 |
&& (pos <= __byteArraySize(coll))) { |
1584 | 300 |
__ByteArrayInstPtr(coll)->ba_element[pos-1] = ch; |
301 |
__INST(position) = __MKSMALLINT(pos + 1); |
|
302 |
if ((__readLimit >= 0) && (pos >= __readLimit)) { |
|
303 |
__INST(readLimit) = __MKSMALLINT(pos); |
|
304 |
} |
|
305 |
RETURN ( anObject ); |
|
306 |
} |
|
307 |
} else if (cls == @global(Array)) { |
|
2883 | 308 |
if (pos <= __arraySize(coll)) { |
1584 | 309 |
__ArrayInstPtr(coll)->a_element[pos-1] = anObject; |
310 |
__STORE(coll, anObject); |
|
311 |
__INST(position) = __MKSMALLINT(pos + 1); |
|
312 |
if ((__readLimit >= 0) && (pos >= __readLimit)) { |
|
313 |
__INST(readLimit) = __MKSMALLINT(pos); |
|
314 |
} |
|
315 |
RETURN ( anObject ); |
|
316 |
} |
|
317 |
} |
|
318 |
} |
|
63 | 319 |
} |
2894 | 320 |
#endif |
260 | 321 |
%}. |
293 | 322 |
(writeLimit isNil |
323 |
or:[position <= writeLimit]) ifTrue:[ |
|
1584 | 324 |
(position > collection size) ifTrue:[self growCollection]. |
325 |
collection at:position put:anObject. |
|
326 |
(position > readLimit) ifTrue:[readLimit := position]. |
|
327 |
position := position + 1. |
|
838 | 328 |
] ifFalse:[ |
1965 | 329 |
WriteErrorSignal raiseErrorString:'write beyond writeLimit' |
293 | 330 |
]. |
1 | 331 |
^anObject |
332 |
! |
|
333 |
||
334 |
nextPutAll:aCollection |
|
63 | 335 |
"append all elements of the argument, aCollection to the stream. |
336 |
Redefined to avoid count grows of the underlying collection - |
|
337 |
instead a single grow on the final size is performed." |
|
1 | 338 |
|
339 |
|nMore final| |
|
340 |
||
77 | 341 |
collection isNil ifTrue:[ |
260 | 342 |
^ super nextPutAll:aCollection |
77 | 343 |
]. |
344 |
||
1 | 345 |
nMore := aCollection size. |
346 |
final := position + nMore - 1. |
|
293 | 347 |
(writeLimit notNil |
348 |
and:[final > writeLimit]) ifTrue:[ |
|
349 |
final := writeLimit. |
|
350 |
nMore := final - position + 1 |
|
351 |
]. |
|
1 | 352 |
(final > collection size) ifTrue:[ |
252 | 353 |
self growCollection:final |
1 | 354 |
]. |
355 |
collection replaceFrom:position |
|
252 | 356 |
to:final |
357 |
with:aCollection |
|
358 |
startingAt:1. |
|
1 | 359 |
|
360 |
position := position + nMore. |
|
361 |
(position > readLimit) ifTrue:[readLimit := position - 1]. |
|
362 |
^ aCollection |
|
1539
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
363 |
! |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
364 |
|
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
365 |
nextPutAll:aCollection startingAt:pos1 to:pos2 |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
366 |
"append some elements of the argument, aCollection to the stream. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
367 |
Redefined to avoid count grows of the underlying collection - |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
368 |
instead a single grow on the final size is performed." |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
369 |
|
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
370 |
|nMore final| |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
371 |
|
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
372 |
collection isNil ifTrue:[ |
1541 | 373 |
^ super nextPutAll:aCollection startingAt:pos1 to:pos2 |
1539
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
374 |
]. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
375 |
|
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
376 |
nMore := pos2 - pos1 + 1. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
377 |
final := position + nMore - 1. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
378 |
(writeLimit notNil |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
379 |
and:[final > writeLimit]) ifTrue:[ |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
380 |
final := writeLimit. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
381 |
nMore := final - position + 1 |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
382 |
]. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
383 |
(final > collection size) ifTrue:[ |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
384 |
self growCollection:final |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
385 |
]. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
386 |
|
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
387 |
collection replaceFrom:position |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
388 |
to:final |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
389 |
with:aCollection |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
390 |
startingAt:pos1. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
391 |
|
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
392 |
position := position + nMore. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
393 |
(position > readLimit) ifTrue:[readLimit := position - 1]. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
394 |
^ aCollection |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
395 |
|
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
396 |
" |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
397 |
|s| |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
398 |
|
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
399 |
s := '' writeStream. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
400 |
s nextPutAll:'hello '. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
401 |
s nextPutAll:'1234world012345' startingAt:5 to:9. |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
402 |
s contents |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
403 |
" |
b1ac096a81e3
added #nextPutAll:startingAt:to:
Claus Gittinger <cg@exept.de>
parents:
1405
diff
changeset
|
404 |
|
1541 | 405 |
"Modified: 12.7.1996 / 10:31:36 / cg" |
1 | 406 |
! ! |
407 |
||
1965 | 408 |
!WriteStream class methodsFor:'documentation'! |
701 | 409 |
|
410 |
version |
|
3087 | 411 |
^ '$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.40 1997-11-02 18:37:48 cg Exp $' |
701 | 412 |
! ! |