Re: NEWBIE_C: centering %s in sprintf

From: Graham Gilmore (
Date: 05/18/96

On Sat, 18 May 1996 wrote:

> I added a command and field in the player file so that immortals can set the 
> space where levels are displayed for mortals to up to a 12 character long 
> string.  It works fine but it is justified at the right of the area where 
> the string should go:
> code is [ %12s ] and therefore if the string was set to "Coder" it would show
> [        Coder ] and id like to get it to say [    Coder    ] etc.
> im sure there is a way to do this but i dont know how :P can someone 
> please tell me..

	Sure... if the title is Coder, set your string to
	"    Coder   \0"
	 ^^^^^^^^^^^^12 characters long.  

	Graham Gilmore


This archive was generated by hypermail 2b30 : 12/18/00 PST