[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string> missing?

From: Thibaut Verron
Subject: Re: string> missing?
Date: Thu, 4 Jun 2015 10:08:48 +0200

2015-06-04 9:44 GMT+02:00 Nicolas Richard <address@hidden>:
> Thibaut Verron <address@hidden> writes:
> > Mostly to this:
> >
> > (setq str1 "foo")
> > (setq str2 "foo")
> > (setq str3 str1)
> > (= str1 str2)       ;;==> *error*
> > (eq str1 str2)      ;;==> nil
> > (eq str1 "foo")     ;;==> nil
> > (eq str1 str3)      ;;==> nil
> If that is not a typo, then it is a bug. I get t.

I am 99% sure that it wasn't a typo, but indeed I get t now. I was at
home on windows the first time, and now at work on linux, so I'll need
to retry it tonight to be sure.

> > (string= str1 str2) ;;==> t
> And also:
> (equal str1 str2) ;;==> t

Oh, I didn't know this one. And then it opens up a whole new world of
equality functions, equalp for case-insensitive comparison,

But indeed, it looks like equal is a good candidate for type-agnostic,
dwim-style equality testing.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]