Re: [CODE]

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 07/18/00


James wrote:
>
> You can use the following code:
> void upper ( char *string ) {
>   int i;
>   for (i = 0; i < strlen(string); CAP(string+(++i)));
> }

Or, if you want something that doesn't have to call strlen for each
character (very inefficient)...

void upper(char *buf)
{
  for (; *buf; buf++)
    *buf = UPPER(*buf);
}

Regards, Peter


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT