Jayp,

> How can I tell if there is a QUOTE in my variable an delete it
> 
> Theres a quote in my LIST and its making the list NOT work properly
> 
> Ie.     "From: "Jayp" <[EMAIL PROTECTED]>"
> 
> See the quotes around JAYP
> I need to get rid of them

The trick is to use the offset method in Lingo:

charPos = offset(QUOTE,tString)

The above will return the character index position for the quote character if found in 
the string tString. If the quote character is not found then the offset method returns 
zero. So, to strip *all* instances of the quote character from your string:

on stripQuote (thisString)

  repeat while offset(QUOTE,thisString)

    tPosn = offset(QUOTE,thisString)
    delete thisString.char[tPosn]

  end repeat

  return thisString

end stripQuote 

You would call the above like this:

myNewString = stripQuote(myOldString)

Remember that this example code will pull all quote characters found within the 
provided string. Also keep in mind that the offset method is actually meant to be used 
to find sub-strings within larger strings, I'm just using the simplest case scenario 
of looking for a sub-string that's only one character (the quote character). But you 
can do things like this:

put offset("tom","hi tom, how are you?")
-- 4

It returns the character position of the sub-string as found in the larger string. 
Hope that helps.

Cheers,
Tom 
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to