Can someone give a code example of how to right pad an NSString in objective-c please?
For example want these strings:
Testing 123 Long String Hello
Try below. its working for me.
NSString *someString = @"1234"; NSString *padded = [someString stringByPaddingToLength: 16 withString: @"x" startingAtIndex:0]; NSLog(@"%@", someString); NSLog(@"%@", padded);