[squeak-dev] The Trunk: Collections-ul.584.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Oct 8 10:29:00 UTC 2014
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.584.mcz
==================== Summary ====================
Name: Collections-ul.584
Author: ul
Time: 8 October 2014, 12:27:20.538 pm
UUID: 804f22d8-8350-4e41-b218-3ab57aa6a6cb
Ancestors: Collections-nice.583
Character changes:
- use the value instance variable instead of #asciiValue where possible
- implemented #<= and #>=
=============== Diff against Collections-nice.583 ===============
Item was changed:
----- Method: Character>>< (in category 'comparing') -----
< aCharacter
"Answer true if the receiver's value < aCharacter's value."
+ ^value < aCharacter asciiValue!
- ^self asciiValue < aCharacter asciiValue!
Item was added:
+ ----- Method: Character>><= (in category 'comparing') -----
+ <= aCharacter
+ "Answer true if the receiver's value <= aCharacter's value."
+
+ ^value <= aCharacter asciiValue!
Item was changed:
----- Method: Character>>= (in category 'comparing') -----
= aCharacter
^self == aCharacter or: [
+ aCharacter isCharacter and: [ aCharacter asciiValue = value ] ]!
- aCharacter isCharacter and: [ self asciiValue = aCharacter asciiValue ] ]!
Item was changed:
----- Method: Character>>> (in category 'comparing') -----
> aCharacter
"Answer true if the receiver's value > aCharacter's value."
+ ^value > aCharacter asciiValue!
- ^self asciiValue > aCharacter asciiValue!
Item was added:
+ ----- Method: Character>>>= (in category 'comparing') -----
+ >= aCharacter
+ "Answer true if the receiver's value >= aCharacter's value."
+
+ ^value >= aCharacter asciiValue!
Item was changed:
----- Method: Character>>codePoint (in category 'accessing') -----
codePoint
"Return the encoding value of the receiver."
#Fundmntl.
+
+ ^value!
- ^ self asciiValue!
Item was changed:
----- Method: Character>>macToSqueak (in category 'converting') -----
macToSqueak
"Convert the receiver from MacRoman to Squeak encoding"
| asciiValue |
value < 128 ifTrue: [^ self].
value > 255 ifTrue: [^ self].
asciiValue := #[
196 197 199 201 209 214 220 225 224 226 228 227 229 231 233 232 "80-8F"
234 235 237 236 238 239 241 243 242 244 246 245 250 249 251 252 "90-9F"
134 176 162 163 167 149 182 223 174 169 153 180 168 128 198 216 "A0-AF"
129 177 138 141 165 181 142 143 144 154 157 170 186 158 230 248 "B0-BF"
191 161 172 166 131 173 178 171 187 133 160 192 195 213 140 156 "C0-CF"
150 151 147 148 145 146 247 179 255 159 185 164 139 155 188 189 "D0-DF"
135 183 130 132 137 194 202 193 203 200 205 206 207 204 211 212 "E0-EF"
190 210 218 219 217 208 136 152 175 215 221 222 184 240 253 254 ] "F0-FF"
+ at: value - 127.
- at: self asciiValue - 127.
^ Character value: asciiValue.!
Item was changed:
----- Method: Character>>to: (in category 'converting') -----
to: other
"Answer with a collection in ascii order -- $a to: $z"
+ ^ (value to: other asciiValue)
- ^ (self asciiValue to: other asciiValue)
collect: [:ascii | Character value: ascii]
as: String!
More information about the Squeak-dev
mailing list
|