Re: Case Sensitive Strings

From: Mike Breuer (mbreuer@new.rr.com)
Date: 11/10/01


----- Original Message -----
From: "Ramsey Stone" <ramseystone@HOTMAIL.COM>


>     Ill try to make this my last question for a while,
> but this answer seems unapparent to me. I added wintermute's
> ASCII Pfiles clan snippet. Now when I assign a clan, it changes
> all CAPTIOL letters to lowercase letters.

Unpropper grammar notwithstanding, this is basically the same issue that has
been discussed very recently.  half_chop() calls any_one_arg() which
converts the passed arguments to lower case.  If you don't want this
behavior, you'll need to parse the arguments yourself.  Something like this:

> ACMD(do_assign)
> {
>     struct char_data *victim = NULL;
>     char arg1[MAX_INPUT_LENGTH];
>     char arg2[MAX_INPUT_LENGTH];
       char *ptr;

       skip_spaces(&argument);
       ptr = strtok(argument, " ");
       if (ptr) {
          strcpy(arg1, ptr);
          ptr = strtok(NULL, "\r\n");
          if (ptr) strcpy(arg2, ptr); else *arg2 = 0;
       } else *arg1 = 0;
>
>     if ( !*arg1 || !*arg2 )
>     {
>         send_to_char( "Usage: assign <clan> <leader>\r\n", ch);
>         return;
>     }

Mike

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST