Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: "string" case sensitive / neato flash 4 features
From: John Croteau
Date: Sun, 18 Jul 1999 20:33:01 +0100

Hi Gilbert,

> If ((Eval ("AnswerBit"&count) eq "a") or (Eval ("AnswerBit"&count) eq "A"))
> Is there a way to compare the strings without case sensitivity? In other
> words, just compare the eq "a". Or is it always case sensitive?
It will always be case sensitive, but there is a solution.

I have some plug&play routines which will be available in a couple of
days. The codes will be included in a movie clip so there will be no
need to type the code in. You then just Call the routine. Examples are
shown to show how the code works.

The solution (code below) is to convert the String to all Lower case
letters (or all upper case) and compare against a standard that is all
lower case.

I have 5 case routines --
1) To all lower case
2) AllCaps
3) Title Caps (first letter in word Cap and the rest lower case)
4) Single letter Lower case.
5) Single letter Upper case.

I also will have 5 Space trimming Routines:
1) Trim Left spaces
2) Trim Right spaces
3) Trim End spaces (left and right)
4) Remove all spaces.
5) Remove Doubled spaces
----------------------------------------------
To Lower Case

Comment: s = local string o = output string
Set Variable: "s" = String
Set Variable: "i" = 1
Set Variable: "o" = ""
Loop While (i <= Length (s))
Set Variable: "Char" = Substring (s, i, 1)
If (Ord(Char) >= Ord ("A") and Ord(Char) <= Ord ("Z"))
Set Variable: "Char" = Chr(Ord(Char) + 32)
End If
Set Variable: "o" = o & Char
Set Variable: "i" = i + 1
End Loop
Set Variable: "String" = o

----------- -----------------------
John Croteau croteauaterols [dot] com (mailto:croteauaterols [dot] com)
------------- -------------------------
FlashTek (Advanced Websites with Flash) http://www.FlashTek.com/
Flash Bible (Fast track to good Flash) http://www.FlashBible.com/
Flash Central(The Universe Starts Here) http://www.FlashCentral.com/
The Flash Tech Resource (Tech Notes) http://www.FlashCentral.com/tech/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  FLASH: "string" case sensitive / neato f, Gilbert Irias

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]