requires: {#Mixin}. provides: {#CharMixin}. "Mixins addSlot: #CharMixin valued: Cloneable derive." prototypes addSlot: #CharMixin valued: Cloneable derive. "This mixin acts on streams of various kinds to specialize them for characters." t@(CharMixin traits) cr "Append a carriage return." [ t nextPut: Character cr. t ]. t@(CharMixin traits) tabs: n "Append n number of tab characters." [ n timesRepeat: [t nextPut: Character tab]. t ]. t@(CharMixin traits) space "Append a single space." [ t nextPut: Character space. t ]. t@(CharMixin traits) ensureASpace "Append a space if the end element isn't one already." [ (t position isNotNil and: [(collection at: t position) = Character space]) ifFalse: [t nextPut: Character space]. t ]. t@(CharMixin traits) ensureNoSpace "Remove a single space at the end if there is one." [ (t position isNotNil and: [(collection at: t position) = Character space]) ifTrue: [t skip: -1]. t ].