Fast way to delete all occurrences of a certain character in a string

I know you can do this in one command (ok maybe not one, but just a couple) by the setting the delimiter, but I’ve been working too hard and can’t remember how to do it. Already did a search.

I want to delete all double quote marks out of my string. "

thanks

Ok, did some more digging. using something like this:


set AC_raw to the clipboard
set AppleScript's text item delimiters to quote
set AC_raw to every text item of AC_raw

Where the clipboard equals text string: MacBook 13" MacBook 15" MacBook 17"

But have it return it as a single string.

Hello

Here is a handler which I use very often.


set AC_raw to my supprime(the clipboard as text, quote)

--=====
(*
removes every occurences of d in text t
*)
on supprime(t, d)
	local oTIDs, l
	set oTIDs to AppleScript's text item delimiters
	set AppleScript's text item delimiters to d
	set l to text items of t
	set AppleScript's text item delimiters to ""
	set t to l as text
	set AppleScript's text item delimiters to oTIDs
	return t
end supprime

--=====

Yvan KOENIG (VALLAURIS, France) mercredi 19 octobre 2011 09:32:36

That makes me happy. that is basically four lines taking care of it.
Thank you Yvan