Re: Prepending to fixed length
Re: Prepending to fixed length
- Subject: Re: Prepending to fixed length
- From: Sherm Pendley <email@hidden>
- Date: Tue, 18 Jul 2006 16:02:02 -0400
On Jul 18, 2006, at 3:43 PM, Trygve Inda wrote:
I have an int that I want converted into a string but I want it
prefixed
with zeros to a fixed length. So.
1 = 00001
2 = 00002
534 = 00534
Basically the opposite of
stringByPaddingToLength:withString:startingAtIndex:
Is there a method to do this directly?
NSString *foo = [NSString stringWithFormat:@"]", aSignedInt];
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden