• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Format a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Format a string


  • Subject: Re: Format a string
  • From: Daryn <email@hidden>
  • Date: Tue, 23 Dec 2003 20:45:45 -0600

try
[string stringByPaddingToLength:10 withString:@  startingAtIndex:0];
or
[NSString stringWithFormat:"%-10s"]



On Dec 23, 2003, at 5:08 AM, Daniele wrote:

> i need to format a bit of strings with an equal number of characters.
> The formatted string length is 10. Now, for ex, if i have a string of 5
> chars i need to add other 5 empty chars to format it. Is there a method
> to do it without using a "for" with appendString method?
>
> Thanks
> Daniele
> _______________________________________________
> cocoa-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Format a string (From: Daniele <email@hidden>)

  • Prev by Date: Re: who is putting up this dialog?
  • Next by Date: Re: who is putting up this dialog?
  • Previous by thread: Format a string
  • Next by thread: KVO unregistering, document-based app
  • Index(es):
    • Date
    • Thread