Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Text
Last updated at 1:39 pm UTC on 16 May 2017
Text is a class similar to the class String. But the Text objects may include emphasis attributes such as italics or bold. So Text is a class which "wraps" an instance of String and attributes.

Every character may have its own attributes. The implementation is done in a space efficient way. The information is stored in a runs instance variable. Only the necessary attribute are stored and each change is indicated.

Class hierarchy: (Squeak 3.3a-4664)
ProtoObject #()
	*Object* #()
		*Collection* #()
			*SequenceableCollection* #()
				*ArrayedCollection* #()

					Text #('*string>String*' '*runs>RunArray*')



A simple way to create a Text object:

 Text fromString: 'hello world!'

Or from HTML

 Convert HTML to Text

Boris Gaernter sent some additional documenation to the mailing list on 12-June-2003; see also TextStream