Utf32BigEndianView
Description
A <Utf32BigEndianView> provides a bidirectional view over the unicode component as a collection of UTF-32 code units in big-endian format
• #next/#previous - Answers an 32-bit <Integer>.
• #contents - Answers a <Utf32BE>
Examples
| view beA beB beC |
view := Utf32BigEndianView on: 'abc'.
self assert: [view next = (beA := (OSUInt32 new at: 0 put: $a value; yourself) beUint32At: 0)].
self assert: [view next = (beB := (OSUInt32 new at: 0 put: $b value; yourself) beUint32At: 0)].
self assert: [view next = (beC := (OSUInt32 new at: 0 put: $c value; yourself) beUint32At: 0)].
self assert: [view atEnd].
self assert: [view previous = (beC := (OSUInt32 new at: 0 put: $c value; yourself) beUint32At: 0)].
self assert: [view previous = (beB := (OSUInt32 new at: 0 put: $b value; yourself) beUint32At: 0)].
self assert: [view previous = (beA := (OSUInt32 new at: 0 put: $a value; yourself) beUint32At: 0)].
self assert: [view atStart].
self assert: [view contents asArray = { beA. beB. beC. }]
Class Methods
None
Instance Methods
None
Last modified date: 04/20/2022