Going a bit nuts with a stringWithFormat...

Discussion in 'iOS Programming' started by ulbador, Dec 1, 2010.

  1. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #1
    Is there a way to auto-pad this?

    Code:
    
    int checksum = 15;
    [NSString stringWithFormat:@"%X",checksum];
    
    
    This comes out to be "0F" in hex. But as is, it just returns "F".
     
  2. ulbador thread starter macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #3

Share This Page