• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Replacing a character/word
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Replacing a character/word (From: "Domains4Days.com" <email@hidden>)

  • Prev by Date: RE: more news from the front
  • Next by Date: Re: a little bit offlist: charakter tables
  • Previous by thread: Re: Replacing a character/word
  • Next by thread: Re: Replacing a character/word
  • Index(es):
    • Date
    • Thread