Re: Replacing a character/word
Re: Replacing a character/word
- Subject: Re: Replacing a character/word
- From: Emmanuel <email@hidden>
- Date: Tue, 17 Dec 2002 20:13:23 +0100
At 9:50 AM -0800 17/12/02, Domains4Days.com wrote:
=== I will try this and hopefully it will work well...
-------------untested
on Replace(x, a, b) -- "this is a test of replace", "test", "cool test"
set text item delimiters to a
set x to text items of a -- {"this is a ", " of replace"}
set text item delimiters to b
set x to x as list - "this is a cool test of replace"
return x
end
---------------------
Oh, you want to use it. Then it' s a completely different story:
------------------------- tested
on Replace(x, a, b) -- "this is a test of replace", "test", "cool test"
set text item delimiters to a
set x to text items of x -- {"this is a ", " of replace"}
set text item delimiters to b
set x to (x as text) -- "this is a cool test of replace"
return x
end Replace
-------------------------
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.