Re: Convert first char to lower case
Re: Convert first char to lower case
- Subject: Re: Convert first char to lower case
- From: has <email@hidden>
- Date: Thu, 10 Jan 2002 19:54:18 +0000
Arthur J Knapp wrote:
>
character 1 of str --> "H"
>
item 1 of str --> "H"
I'd say they were interchangeable w.r.t. strings, but not analogous. For
example, using 'character' instead of 'item' is an easy way to get an error
is thrown if your code requires a string but gets passed, say, a list
instead (which would slip by 'item' but not by 'character').
OTOH, 'character' may be constricted by the 32KB limit - I can't remember.
Item isn't. [Darn pesky limit...]
--
BTW, I think I've found a simple way of doing a comparison of strings
longer than 32KB:
if a contains b and b contains a then
true
else
false
end
Has it been done before? Is this a reliable way to get round AS's inability
to compare long strings for equality? Or does anyone know if there's
instances where it doesn't work?
As far as I can tell, 'contains' is not subject to the 32KB limit (i.e. it
seems to work ok here on OS8.6). But if it's known to break on other
versions of AS I'd sure like to hear before I use it for anything important.
Cheers
has