From:  Ciaran M. Foley
Subject: Urgent programming help needed.
Date: 
Message-ID: <9311112139.aa11553@Bonnie.ics.uci.edu>
>
>
>help!
>
>I need to compare two strings, for example: ("goo") and ("GOO"). I
>realize that I can use the EQUAL function to compare two lists. How
>might I compare two strings in a similar fashion, disregarding case?
>(ie: goo is the same as GOO and returns true).
>
>Thanks,
>Ciaran
>
>
>........ . . . . . .  .  .  .  .   .    .    .      .        .
>ciaran foley                           7 1 4 / 8 3 0 - 3 5 7 9
>······@bonnie.ics.uci.edu                                pager
>information & computer science                           voice
>university of california at irvine                        data
>........ . . . . . .  .  .  .  .   .    .    .      .      fax
>
>
>------- End of Unsent Draft

From: Richard Levitte
Subject: Re: Urgent programming help needed.
Date: 
Message-ID: <LEVITTE.93Nov13002958@eliza.e.kth.se>
>>>>> On 12 Nov 93 05:40:02 GMT, ······@Bonnie.ICS.UCI.EDU (" Ciaran M. Foley ") said:

>I need to compare two strings, for example: ("goo") and ("GOO"). I

use STRING-EQUAL:

	(STRING-EQUAL "goo" "GOO") --> T

--
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
! Richard Levitte, VMS GNU Emacs hacker   ! tel: int+46-8-18 30 99            !
! Sulv"agen 57, II                        ! fax: none for the moment          !
! S-126 40 H"agersten                     ! Internet: ·······@e.kth.se        !
! SWEDEN                                  !                                   !
!-----------------------------------------------------------------------------!
From: Jim McDonald
Subject: Re: Urgent programming help needed.
Date: 
Message-ID: <1993Nov13.195820.3098@kestrel.edu>
In article <··················@Bonnie.ics.uci.edu>, ······@Bonnie.ICS.UCI.EDU (" Ciaran M. Foley ") writes:
...
|> >I need to compare two strings, for example: ("goo") and ("GOO"). I
|> >realize that I can use the EQUAL function to compare two lists. How
|> >might I compare two strings in a similar fashion, disregarding case?
|> >(ie: goo is the same as GOO and returns true).
...

You said you needed to compare two strings, but then gave an example
of two (one-element) lists of strings, so it's not entirely clear what
you want.   (To further complicate matters, your last line could at face
value refer to symbols, not strings, since you did not use quotes, but I 
assume that was just a typo.)  Nonetheless, it should be easy to find a 
useable function.

Guy Steele's book "Common Lisp, The Languge" (aka CLtL or CLtL2),
is organized to make this kind of information very easy to locate -- 
just look for the section on strings and you will find several routines
for comparing strings.  Look for the entry "equality predicates" and 
you will find a discussion of eq, equal, equalp, etc.   The documentation
from your vendor should be equally easy to reference.

Here are some examples I just ran that might help in this case:

> (string= "aaa" "AAA")
NIL

> (string-equal "aaa" "AAA")
T 

> (equal "aaa" "AAA")
NIL 

> (equalp "aaa" "AAA")
T 

> (equalp '("aaa") '("AAA"))
T 

But note that '("aaa") and '("AAA") are both lists (each containing 
just one string), hence they are not legal arguments to the string 
equality functions:

> (string-equal '("aaa") '("AAA"))
Error: STRING1 argument should be a string
...

> (string= '("aaa") '("AAA"))
Error: STRING1 argument should be a string
...

-- 
James McDonald
Kestrel Institute                       ········@kestrel.edu
3260 Hillview Ave.                      (415) 493-6871 ext. 339
Palo Alto, CA 94304                fax: (415) 424-1807