[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]Call for test cases... Numeric Formatting
From: |
Jonathan P Springer |
Subject: |
Re: [DotGNU]Call for test cases... Numeric Formatting |
Date: |
Tue, 26 Nov 2002 11:59:56 -0500 |
User-agent: |
Mutt/1.4i |
On Tue, Nov 26, 2002 at 02:06:51AM +0530, Gopal V wrote:
> If memory serves me right, Jonathan P Springer wrote:
> > I'm giving StringBuilder quite a workout.
>
> A StringBuilder is always more efficent than basic string concat
> operations ... (maybe not always ... but most of the time ... ;-)
> In theory this should be faster than string '+' ... (But you knew
> that already .. and that's why you used SB ... )
Mostly. There are a couple of places I use '+' because it's more
readable, and I come from the "don't performance tune until it works"
school.
> I really want to write a hex dumper in C# ... with the formatting
> stuff of course ...
Give it a go. String.Format("0x{X2}",(byte)255) --> "0xFF". Sounds
like a solid test.
> Btw,can Michael Moore reuse any of your cool stuff for formatting
> support ? ... viz for printing "09" instead of simply "9" .... I
> suppose the string formatting could do that ? ..
String.Format("{D2}", (int)9) --> "09", I think. I'll add both of these
as test cases :-).
> Also I very much prefer to get constant feedback from people
> working on things .. just so that I can sleep easy ... Rich333
> once surprised us with a 2300 line patch we gave up trying to
> integrate ... which coincidentially was Numeric formatting ....
This will be a big patch, but I've been keeping it in sync with CVS.
I'll commit about 10 hours from this e-mail.
Regards,
-js
--
-Jonathan P Springer <address@hidden>
------------------------------------------------------------------------------
"A standard is an arbitrary solution to a recurring problem." - Joe Hazen
- [DotGNU]Call for test cases... Numeric Formatting, Jonathan P Springer, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Gopal V, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Jonathan P Springer, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Gopal V, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting, Rhys Weatherley, 2002/11/25
- Re: [DotGNU]Call for test cases... Numeric Formatting,
Jonathan P Springer <=
- [DotGNU]Simple hex dumper (Was: Call for test cases... Numeric Formatting), Gopal V, 2002/11/28
- [DotGNU]Banner in C#, CH Gowri Kumar, 2002/11/28
- [DotGNU]India.cs, CH Gowri Kumar, 2002/11/28