Padding NSString not working
问题 I have read that to left-pad an NSString all you need to do is this: NSString *paddedStr = [NSString stringWithFormat:@"%-20.20@ %-20.20@", aString, anotherSting]; But, that does not work !! I don´t know why. I have tried a lot of combinations without success. Examples: NSString *paddedStr = [NSString stringWithFormat:@"%-20s@", " ", myString]; but that way is ugly and ... ugly. It just append 20 times the char (" ") before the string (myString) and that is not what we need right? The goal is