[Pharo-dev] Why we should run SmallLint

Stéphane Ducasse stephane.ducasse at inria.fr
Fri Aug 2 16:26:30 EDT 2013


convertFromCompoundText

	| readStream converter |
	readStream := self readStream.
	^ self class new: self size streamContents: [ :writeStream|
		converter := CompoundTextConverter new.
		converter ifNil: [^ self].
		[readStream atEnd] whileFalse: [
			writeStream nextPut: (converter nextFromStream: readStream)]].

CompoundTextConverter new -> DNU


convertFromSystemString

	| readStream converter |
	readStream := self readStream.
	^ self class new: self size streamContents: [ :writeStream|
		converter := LanguageEnvironment defaultSystemConverter.
		converter ifNil: [^ self].

	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		[readStream atEnd] whileFalse: [
			writeStream nextPut: (converter nextFromStream: readStream)]].


systemConverterClass

	self subclassResponsibility.
	^ Latin1TextConverter.


What!!!!

Stef




More information about the Pharo-dev mailing list