I've come across an implementation of #asInteger and #asSignedInteger in
Pharo 3.0 that leaves me scratching my head.

Can anyone explain why it was defined to answer what it does for strings
that one would really not expect to parse as a number.

'abc-123-xyz-897' asSignedInteger
    ===>  -123 

To my mind, the method that does this for the example string should have an
intention revealing name like #spelunkIntegerFromString or some such.


Thanks,
Richard



--
View this message in context: 
http://forum.world.st/Can-anyone-explain-asInteger-for-Strings-tp4929502.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply via email to