Re: [NEWBIE] Cutting chars

From: Jason Wilkins (fenix@io.com)
Date: 11/11/98


On Wed, 11 Nov 1998, Roger Smith wrote:

> I don't want to send the last character.
> So the player will see: poo

char *monkey = "poop";
char *temp;

temp = strdup(monkey);
temp[strlen(temp) - 1] = '\0';
send_to_char(temp);
free(temp);

--
         The Phoenix - President of The Artistic Intuition Company
    Caelius * Zen-X * Mirror Reflex * Runica * X-Domain * Infinite Realms
                          http://www.io.com/~fenix


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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