pharo
pharo copied to clipboard
String as integer
Redoing https://github.com/pharo-project/pharo/pull/17299 Because of conflicts
This PR Does the following:
- Changed the semantics of the method
String>>#asIntegerNow, it returns a integer ONLY if the complete String is a valid integer, else it raises an exception. - Deprecated
String>>#asSignedInteger. - Copied the old implementation of
String>>#asIntegertoString>>#extractIntegerPart. That new method behaves exactly as the oldasInteger. - Changed the semantics of
String>>#asUnsignedIntegerto just callString>>#asIntegerand then getting the absolute value. - Updated all senders of
String>>#asIntegerto callString>>#extractIntegerPartinstead. - Updated and added test to document this behevior.
This also closes #17277
Oups build fails.
We still get a problem
MetacelloNotification: Loaded -> Deprecated14 --- tonel:///builds/workspace/est_and_branch_Pipeline_PR-18503/64/src()
Error: The string '1. 379 forks on GitHub' is not a valid integer
ByteString(Object)>>error:
ByteString(String)>>asInteger
MicOrderedListBlock>>startIndexFrom:
MicOrderedListBlock>>addLineAndReturnNextNode:
MicRootBlock(MicAbstractBlock)>>newBlockFor:parent:
MicRootBlock>>addLineAndReturnNextNode:
MicrodownParser>>handleLine:
MicrodownParser>>handleLine:
MicrodownParser>>parse:
MicrodownParser class>>parse:
Microdown>>parse:
Microdown class>>parse:
MicrodownPresenter>>documentFromString:
StWelcomeTopicMicrodownPresenter>>contents:
StWelcomeBrowser>>newTopicTitle:contents:
StWelcomeBrowser>>topics
StWelcomeBrowser>>updatePresenter
StWelcomeBrowser(SpPresenter)>>initializePrivateHooks
StWelcomeBrowser(SpPresenter)>>initialize
StWelcomeBrowser class(SpPresenter class)>>newApplication:
StWelcomeBrowser class(StPresenter class)>>new
StWelcomeBrowser class>>openForRelease
BaselineOfPharo>>postload:package: