• 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: Return character
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return character


  • Subject: Re: Return character
  • From: Arthur J Knapp <email@hidden>
  • Date: Thu, 18 Oct 2001 13:45:58 -0400

> From: email@hidden
> Date: Thu, 18 Oct 2001 17:06:09 +0200
> Subject: Return character

> How do I convert AppleScript return (unix ascii 13?) to HyperCard (classic
> app ascii 10 and ascii 13) return.

Assuming you mean "search and replace" Ascii 13 with Ascii 13 & 10:

property kMacReturn : return
property kUnxReturn : ASCII character 10
property kWinReturn : kMacReturn & kUnxReturn

set myString to "Hello
World"

SearchReplace(myString, kMacReturn, kWinReturn)

-- > "Hello\r\nWorld"

on SearchReplace(main_string, find_string, replace_string) -- case-sensitive
set oldDelim to text item delimiters

set text item delimiters to find_string
set main_string to text items of main_string

set text item delimiters to replace_string
set main_string to main_string as string

set text item delimiters to oldDelim

return main_string
end SearchReplace


Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden

Hey, check out:
http://www.zavatone.com/


  • Prev by Date: fun with records and keywords
  • Next by Date: Re: Tex-Edit memory limitation
  • Previous by thread: Re: Return character
  • Next by thread: Return character
  • Index(es):
    • Date
    • Thread