Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1460 (closed enhancement: invalid)

Opened 12 years ago

Last modified 12 years ago

tango.text.convert.Integer.toString() does not support ulong

Reported by: mrmonday Assigned to: kris
Priority: normal Milestone: 0.99.8
Component: Tango Version: trunk
Keywords: Cc:

Description

Would it be possible to add another toString() function to support ulong?

Change History

01/26/09 23:37:03 changed by kris

  • status changed from new to assigned.

not really, given the char/wchar/dchar variations also. Just cast the argument?

01/27/09 17:50:36 changed by korDen

Casting ulong value to long might give wrong result (i.e. negative).

01/27/09 19:04:32 changed by mrmonday

If I cast to long then the returned string isn't the string equivalent of ulong when the value of the ulong > long.max. eg 9223372036854775809 when cast to long becomes -9223372036854775807. This is the expected behavior for the current function, but ideally there would be a function supporting ulong.

01/28/09 03:01:36 changed by kris

well, you can specify the formatting should be unsigned :)

01/28/09 16:45:44 changed by mrmonday

  • status changed from assigned to closed.
  • resolution set to invalid.

Ah, didn't spot that, thanks :D Might be good to update the documentation to make it slightly more obvious for people like me.

01/29/09 02:40:48 changed by kris

Yes, more info is always a good thing. Thanks mrmonday