3 ByteString classMethod!
4 newFromBytes: aByteArray
5 ^ (self basicNew: aByteArray size) initializeWithBytes: aByteArray!
11 <primitive: 'ByteString_at'>
13 ifTrue: [ self error: 'index out of bounds' ].
15 ifTrue: [ ^ self at: anInteger asInteger ]
16 ifFalse: [ self error: 'index is not an integer']!
20 <primitive: 'ByteString_size'>
25 <primitive: 'ByteArray_at'>
29 byteAt: anInteger put: anObject
30 <primitive: 'ByteArray_at_put'>
35 <primitive: 'ByteArray_size'>
42 bytes := ByteArray new: self byteSize.
45 [ index <= bytes size ]
46 whileTrue: [ bytes at: index put: (self byteAt: index).
56 <primitive: 'ByteString_compare'>
57 self error: 'argument is not a ByteString'!
60 compareOrdinal: aString
61 "compare the individual Unicode code points in the string irrespective of locale"
62 <primitive: 'ByteString_compareOrdinal'>
63 self error: 'argument is not a ByteString'!
67 <primitive: 'ByteString_hash'>
74 <primitive: 'ByteString_reversed'>
88 initializeWithBytes: aByteArray
93 [ index <= aByteArray size ]
94 whileTrue: [ self byteAt: index put: (aByteArray at: index).