Skip to content

Instantly share code, notes, and snippets.

@PauloLeon PauloLeon/gambeta.m
Created Aug 10, 2019

Embed
What would you like to do?
gambfeia
NSString *agency = @"1234";
NSString *account = @"1234";
int count01 = [agency length];
int count03 = [account length];
if (count01+count03 < 12) {
NSString *newStr = agency;
int countDown = 12 - (count01 + count03);
for (int i = 1; i <= countDown; i++) {
NSLog(@"%d", i);
newStr = [newStr stringByAppendingString:@"0"];
}
newStr = [newStr stringByAppendingString:account];
NSLog(@"%S", newStr);
NSLog(@"%i", [newStr length]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.