Skip to content

Instantly share code, notes, and snippets.

@PauloLeon
Created August 10, 2019 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PauloLeon/25c3e776119de9da71165c320c38af38 to your computer and use it in GitHub Desktop.
Save PauloLeon/25c3e776119de9da71165c320c38af38 to your computer and use it in GitHub Desktop.
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