On Jul 31, 2008, at 1:15 PM, Tim Jones wrote:
Is Select Case support to ignore case with comparing strings?
Yes.
I'm trying to process args() and I'm duplicating an existing Unix
tools that's unavailable on OS X and the source is long ago lost.
However, the original app had different meanings for different case
- i.e.: -s meant one thing while -S meant something else.
Did my nice clean Select Case just become a huge nested If - ElseIf -
End If block using StrComp in binary mode?
There's nothing "nested" about it, nor would it be any huger than your
Select Case block. In fact it'd be slightly shorter, in terms of the
number of lines (though you would have two extra tokens per case line).
You could probably do this with the funky expression syntax (Select
Case can do all sorts of bizarre things), but personally, I'd just
switch it to an if/elseif structure and have done with it.
Alternatively, you could pass your string through
StringUtils.EncodeCase, and then use Select Case.
Best,
- Joe
--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|