Skip navigation.
 
mlPrepending to fixed length
FROM : Trygve Inda
DATE : Tue Jul 18 21:43:55 2006

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?

Trygve

Related mailsAuthorDate
mlPrepending to fixed length Trygve Inda Jul 18, 21:43
mlRe: Prepending to fixed length Sherm Pendley Jul 18, 22:02
mlRe: Prepending to fixed length Trygve Inda Jul 18, 23:54
mlRe: Prepending to fixed length j o a r Jul 19, 00:00
mlRe: Prepending to fixed length stephen joseph but… Jul 19, 00:00
mlRe: Prepending to fixed length Trygve Inda Jul 19, 00:02
mlRe: Prepending to fixed length Robert Walker Jul 19, 00:10
mlRe: Prepending to fixed length Matt Neuburg Jul 19, 02:06
mlRe: Prepending to fixed length Trygve Inda Jul 19, 11:14