[Glass] UUID>>#asString36 DNU in GS 3.6.6
Gabriel Cotelli
g.cotelli at gmail.com
Tue Sep 5 10:53:05 PDT 2023
The implementation in the base image sends the message #'printStringBase:' that
is not implemented.
To reproduce evaluate something like:
UUID new asString36
The fix is straightforward using printStringRadix: instead
asString36
| num candidate |
num := 0.
1 to: self size do: [:i | num := num + ((256 raisedTo: i - 1) * (self at:
i))].
candidate := num printStringRadix: 36.
^((candidate beginsWith: '36r')
ifTrue: [candidate copyFrom: 4 to: candidate size]
ifFalse: [candidate]) asLowercase
Regards,
Gabriel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/glass/attachments/20230905/201b1f51/attachment.htm>
More information about the Glass
mailing list