Pete Bacon Darwin
2007-Nov-19 09:26 UTC
[Ironruby-core] Fwd: BigInteger.ToString(int radix)
This never seemed to appear on the list...
---------- Forwarded message ----------
From: Peter Bacon Darwin <bacondarwin at googlemail.com>
Date: 17 Nov 2007 21:43
Subject: BigInteger.ToString(int radix)
To: ironruby-core at rubyforge.org
Hi, Just a quick question.
When BigInteger converts a string in a specific base, the letters it outputs
are upper case. In MRI the letters are in lower case. Is there a specific
reason for them to be in uppercase in BigInteger - for instance does
IronPython use uppercase?
Would it be acceptable to change the
private static void AppendRadix(uint rem, uint radix, char[] tmp,
StringBuilder buf, bool leadingZeros) {
const string symbols =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
to
private static void AppendRadix(uint rem, uint radix, char[] tmp,
StringBuilder buf, bool leadingZeros) {
const string symbols =
"0123456789abcdefghijklmnopqrstuvwxyz";
Alternatively, the down casing could be done in the Bignum.to_s(radix)
method but this seems wasteful.
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/ironruby-core/attachments/20071119/c4ce2fe3/attachment.html