🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clu
Article #16

Re: Upper/Lower case (repost)

#16
From: John Haxby
Date: Tue, 07 May 1991 13:57
31 lines
1831 bytes
[ I am reposting this because a number of sites do not yet know that
   comp.lang.clu is now unmoderated.  If you do NOT get this article
   twice, please ask your news manager to fix the active file.
				- Matti Jokinen, ex-moderator ]

In article <42526@netnews.upenn.edu>, alas@eniac.seas.upenn.edu (David J. Alas) writes:
|> Just a quick question about CLU.  I'm comparing strings but I want to do
|> so in a manner that is case insensitive.  For example, I want the boolean
|> 	string$equal ("CLU","clu") 
|> to yield true (instead of false).  Any help would be appreciated.

There are a selection of ways, it depends what you are doing.  Sometimes it
is appropriate to do

        string$equal ("clu", "CLU") cor string$equal ("clu", "clu")

Sometimes it is appropriate to convert to upper or lower case before
comparing, eg

        string$equal (supper ("clu"), "CLU")

The way ted does case-indepentent searches is interesting, it uses
_bytevec$nc_indexv and it makes use of _cvt [_bytevec, string]() which is
horrible :-)
-- 
John Haxby, Definitively Wrong.
Digital				<jch@wessex.rdg.dec.com>
Reading, England		<...!ukc!wessex!jch>

----------------------------------------------------------------
The opinions expressed herein are my own, not my employers.
Technical Details
Message-ID: <moj.673624676@polaris>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!news.funet.fi!polaris.utu.fi!polaris!moj
References: <42526@netnews.upenn.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!news.funet.fi!polaris.utu.fi!polaris!moj
From: jch@hollie.rdg.dec.com (John Haxby)
Newsgroups: comp.lang.clu
Subject: Re: Upper/Lower case (repost)
Message-ID: <moj.673624676@polaris>
Date: 7 May 91 13:57:56 GMT
References: <42526@netnews.upenn.edu>
Sender: moj@polaris.utu.fi (Matti Jokinen)
Distribution: inet
Organization: University of Turku, Finland
Lines: 31
Approved: moj@utu.fi