Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!news
From: kit@delphi.bsd.uchicago.edu (Kit Transue)
Subject: Re: Modifying String behavior (superclass varies type)
Message-ID: <1995Jan30.160916.12827@midway.uchicago.edu>
Sender: news@uchinews.uchicago.edu (News System)
Organization: University of Chicago -- Academic Information Technologies
References: <3ggdbk$s7r@jabba.cybernetics.net>
Date: Mon, 30 Jan 1995 16:09:16 GMT
Lines: 34

In article <3ggdbk$s7r@jabba.cybernetics.net> Douglas Camp  
<dcamp@cybernetics.net> writes:
> kit@delphi.bsd.uchicago.edu (Kit Transue) wrote:
> >
> [...]
> > I want to look things up in a dictionary using a case-insensitive  
compare  
> > on strings.
> > 
> [...]

..

> One approach which may provide the behavior you describe (match 
> string keys in a dictionary regardless of case) is to insert 
> the key in a case-insentive form, e.g. as all upper case:

[sketch of implementation]

> This may not work for certain types of applications, e.g. if you 
> need to iterate over the keys of the dictionary and get the keys
> back in their original, unaltered state.  

Doug--

Yes, I need to iterate over the keys of the dictionary in their unaltered  
state.  I must have been so wrapped up in the derive-from-string problem  
that I totally forgot to add this key element to the specification.

If this weren't a requirement, I agree that altering the key may be the  
cleanest solution.

thanks, and sorry to all for the incomplete spec.
kit transue
