I am receiving data in the form of a string from a database like so:
NSString *strTemp = @"000014";
I need to add 1 to the above,
like 000014 + 1 = 000015
000015 + 1 = 000016
depending on some count.
like:
for(int i =1; i < 5; i++)
{
int iTemp = [strTemp intValue] +i; // here i am getting 15 as int no not like 000015, 000016, 000017 ETC
}
I even tried NSString *strWarNo = [NSString stringWithFormat:@"%07d", iTemp];
but leading numbers may not be constant ...like string from db will be anything @"0023" or @"0000056".
I need to add one to while number, not only integer number.
How I can achieve this?