0
i besoin d'une chaîne formated comme ceci:Modificateurs de formatage pour une chaîne à l'intérieur de stringWithFormat?
-(void)updateResult:(NSString*)name withAmount:(int)amount
{
NSString* result = [NSString stringWithFormat:@"%[email protected] with %8i €",name,amount];
...
}
Le format int fonctionne, mais le format de la chaîne ne fonctionne pas. J'ai besoin d'une chaîne, qui utilise 15 caractères. Si la chaîne est plus courte, par ex. 10 caractères, les 5 restants doivent être remplacés par un espace vide.
peut vous aider à satisfaire
concernant camelord
ahh, ok cela a fonctionné. THX! – camelord